code
stringlengths
1
1.72M
language
stringclasses
1 value
#!/usr/bin/env python """ * FCKeditor - The text editor for Internet - http://www.fckeditor.net * Copyright (C) 2003-2007 Frederico Caldeira Knabben * * == BEGIN LICENSE == * * Licensed under the terms of any of the following licenses at your * choice: * * - GNU General Public License Version 2 or l...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2007 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2007 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2007 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2007 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2007 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2007 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2007 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http:...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2007 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2007 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2007 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
Python
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2007 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
Python
try: from setuptools import setup except ImportError: from distutils.core import setup import os.path import sys CMD_CLASS = None try: from googlecode_distutils_upload import upload CMD_CLASS = {'google_upload': upload} except Exception: pass import filecache DOCUMENTATION = filec...
Python
import time from filecache import filecache @filecache(30) def the_time(): return time.time()
Python
''' filecache filecache is a decorator which saves the return value of functions even after the interpreter dies. For example this is useful on functions that download and parse webpages. All you need to do is specify how long the return values should be cached (use seconds, like time.sleep). USAGE: fr...
Python
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fileprocess.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
Python
#coding=utf-8 from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'fileprocess.views.home', name='home'), # url(r'^fileprocess/', include('filep...
Python
# Django settings for fileprocess project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '', ...
Python
from django.db import models # Create your models here.
Python
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 ...
Python
#coding=utf-8 from django.conf.urls import patterns, url import views urlpatterns = patterns( url(r'^$', views.index, name='index'), url(r'filetopic$', views.filetopic, name='filetopic'), url(r'getpic$', views.getPic, name='getpic') )
Python
#coding=utf-8 # Create your views here. import json from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from filepic import GeneratePic def index(request): return HttpResponse("Hello, world. You're at the poll index.") @csrf_exempt def filetopic(request): """请求处理""" ...
Python
#coding=utf-8 import commands import os import uuid class GeneratePic(): """ 文件生成图片列表 """ def enter(self, fieldsData): """ 处理程序入口,根据附件的类型,调用不同的方法 """ resultJson={} imageJsonArray=[] errorMsg="" picPath=fieldsData["picPath"] ...
Python
#coding=utf-8 """ WSGI config for fileprocess project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``W...
Python
"""Downloads files from http or ftp locations. Copyright Joshua Banton""" import os import urllib2 import ftplib import urlparse import urllib import sys import socket version = "0.4.0" class DownloadFile(object): """This class is used for downloading files from the internet via http or ftp. ...
Python
import fileDownloader class DownloadFile(fileDownloader.DownloadFile): pass
Python
from setuptools import setup, find_packages setup(name='fileDownloader.py', version='0.4.0', description="Downloads files via HTTP or FTP", download_url="http://code.google.com/p/filedownload/downloads/list", packages = find_packages(exclude="test"), long_description="""Intro This module is us...
Python
# Django settings for library project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = '' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. DATABASE_NAME = '' # Or path to database file if u...
Python
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ...
Python
from django.conf.urls.defaults import * urlpatterns = patterns('', # Example: # (r'^library/', include('library.foo.urls')), # Uncomment this for admin: # (r'^admin/', include('django.contrib.admin.urls')), )
Python
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ...
Python
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "filex.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
Python
# -*- coding: utf-8 -*- from django.db import models from django import forms from django.utils.translation import ugettext_lazy as _ # Create your models here. TYPE_ENT = ( ( 'ROOT' , 'ROOT' ), ( 'TIERS', 'TIERS'), ) class tstClass(models.Model): codent = models.CharField(_(u'Code Entite'),max_length=...
Python
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
Python
# -*- coding: utf-8 -*- from django.conf.urls import patterns, include, url from models import tstClass from views import URLDelete urlpatterns = patterns('tst.views', # Examples: # url(r'^$', 'filex.views.home', name='home'), # url(r'^filex/', include('filex.foo.urls')), ## model : le modele de don...
Python
# -*- coding: utf-8 -*- from django.contrib import admin from tst.models import tstClass admin.site.register(tstClass)
Python
# -*- coding: utf-8 -*- # Create your views here. from django.template import Context, loader from django.http import HttpResponse from django.shortcuts import get_object_or_404, get_list_or_404 from django.shortcuts import render, render_to_response from django.shortcuts import HttpResponseRedirect from django.core.p...
Python
from django.db import models
Python
from django.conf.urls import patterns, include, url from django.views.generic.simple import direct_to_template # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'filex.views.home', name='home'), # u...
Python
# Django settings for filex project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('chris', 'chris@example.com'), ) ## 2 env de dev BASE_DIR = '/home/chris/Bureau/DVP/python/file-exchange/filex' #BASE_DIR = '/root/tmp/file-exchange/filex' MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'd...
Python
# -*- coding: utf-8 -*- from django.template import Context, loader from django.http import HttpResponse import datetime def hello(request): return HttpResponse("Hello, world.") def index(request): t = loader.get_template('tmpl/index.html') d = datetime.datetime.now() PUB_DATE = d.strftime("%d/%m/%...
Python
""" WSGI config for filex project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` se...
Python
# -*- coding: utf-8 -*- from django.db import models from django import forms from django.views.generic import CreateView from django.utils.translation import ugettext_lazy as _ # Create your models here. TYPE_ENT = ( ( 'ROOT' , 'ROOT' ), ( 'TIERS', 'TIERS'), ) class EntiteClass(models.Model): codent =...
Python
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests that 1 + 1 a...
Python
# -*- coding: utf-8 -*- from django.conf.urls import patterns, include, url from models import UtilisateurClass urlpatterns = patterns('fex.views', # Examples: # url(r'^$', 'filex.views.home', name='home'), # url(r'^filex/', include('filex.foo.urls')), # fex => Entite url(r'^$', 'fex_liste', name...
Python
# -*- coding: utf-8 -*- from django.contrib import admin from fex.models import EntiteClass, UtilisateurClass admin.site.register(EntiteClass) admin.site.register(UtilisateurClass)
Python
# -*- coding: utf-8 -*- # Create your views here. from django.template import Context, loader from django.http import HttpResponse from django.shortcuts import get_object_or_404, get_list_or_404 from django.shortcuts import render, render_to_response from django.shortcuts import HttpResponseRedirect from django.core.p...
Python
# Copyright (C) 2010 Razvan Constantin <razvan.constantin@rconst.net> # # This file is part of FileBow. # # FileBow is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
Python
# Copyright (C) 2010 Razvan Constantin <razvan.constantin@rconst.net> # # This file is part of FileBow. # # FileBow is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
Python
# Copyright (C) 2010 Razvan Constantin <razvan.constantin@rconst.net> # # This file is part of FileBow. # # FileBow is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
Python
# Copyright (C) 2010 Razvan Constantin <razvan.constantin@rconst.net> # # This file is part of FileBow. # # FileBow is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
Python
# Copyright (C) 2010 Razvan Constantin <razvan.constantin@rconst.net> # # This file is part of FileBow. # # FileBow is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
Python
### # Copyright (C) 2010 Razvan Constantin <razvan.constantin@rconst.net> # # This file is part of FileBow. # # FileBow is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
Python
# Copyright (C) 2010 Razvan Constantin <razvan.constantin@rconst.net> # # This file is part of FileBow. # # FileBow is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
Python
# Copyright (C) 2010 Razvan Constantin <razvan.constantin@rconst.net> # # This file is part of FileBow. # # FileBow is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
Python
# Copyright (C) 2010 Razvan Constantin <razvan.constantin@rconst.net> # # This file is part of FileBow. # # FileBow is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
Python
import gtk import urllib import os TARGET_TYPE_URI_LIST = 80 dnd_list = [ ( 'text/uri-list', 0, TARGET_TYPE_URI_LIST ) ] def get_file_path_from_dnd_dropped_uri(uri): # get the path to file path = "" if uri.startswith('file:\\\\\\'): # windows path = uri[8:] # 8 is len('file:///') elif uri.startswith('file...
Python
""" This file provides basic operations support on Google Storage. Currently, upload/download/delete operations are supported. """ import os, sys import tempfile import hashlib sys.path.append('./boto') import boto from env import * from boto.exception import GSResponseError from boto.exception import InvalidUriError...
Python
email_address = 'ollir.h@gmail.com' file_permissions = [u'READ', u'FULL_CONTROL'] "bucket_name for public usage." bucket_name = "ollir-cp" local_dir = "/home/zhango/fileplace_dir"
Python
""" This file keep syncing local directory and Google Storage. """ import os,sys import shutil import operations from env import * def set_local_dir(path): if os.path.exists(path): if os.path.isdir(path): local_dir = path else: return False else: os.makedirs(path) local_dir = path def...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1292508978.846772 _template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/search/content.mako' _template_uri='...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1293190608.75337 _template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/map/maploc.mako' _template_uri='map/m...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1293190519.035128 _template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/map/maploc_topic.mako' _template_uri...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1293295152.02977 _template_filename=u'/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/map/maploc_module_gallery.mako' _tem...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1292461153.3046739 _template_filename=u'/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/map/maploc_module_discounts.mako' ...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1293190626.589577 _template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/map/content.mako' _template_uri='map...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1292929586.45962 _template_filename=u'/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/map/maploc_module_locinfo.mako' _tem...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1293294818.023004 _template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/manage/extJSFormResult.mako' _templa...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1292532092.8096671 _template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/manage/content.mako' _template_uri=...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1293189525.300182 _template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/global/global.mako' _template_uri='g...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1293149235.708851 _template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/global/globalheader.mako' _template_...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1292947239.955646 _template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/homepage/content.mako' _template_uri...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1292685833.045639 _template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/login/forgetpassword.mako' _template...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1292939922.820404 _template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/login/signup.mako' _template_uri='lo...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1292715620.714249 _template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/login/signup_success.mako' _template...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1292685650.772242 _template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/login/content.mako' _template_uri='l...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1292757740.147426 _template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/login/login.mako' _template_uri='log...
Python
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 5 _modified_time = 1293141039.59392 _template_filename='/home/sunzheng/Projects/FidoWeb/FidoWeb_0.98/fidoweb/templates/login/settings.mako' _template_uri='l...
Python
#!python """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() If you want to require a specific version of setuptools...
Python
from sqlalchemy import Table, Column, ForeignKey from sqlalchemy.orm import relation, backref, deferred, mapper from sqlalchemy.types import BigInteger, Integer, String, DateTime from sqlalchemy.dialects.mysql import ENUM from fidoweb.model.meta import Base from fidoweb.model.map import School """ Rules 1. Tables an...
Python
import datetime from sqlalchemy import Table, Column, ForeignKey from sqlalchemy.orm import relation, backref, mapper from sqlalchemy.types import BigInteger, Integer, String, DateTime, Text, Boolean, Date from sqlalchemy.dialects.mysql import ENUM from fidoweb.model.meta import Base """ Rules 1. Tables and Inner r...
Python
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, ForeignKey from sqlalchemy.orm import relation, backref from sqlalchemy.types import Integer, Unicode from fidoweb.model.meta import Base class HomepageGalleryPicType(Base) : __tablename__ = 'homepageGalleryPicTypes' id = Colum...
Python
import datetime from sqlalchemy import Table, Column, ForeignKey from sqlalchemy.orm import relation, backref, mapper, deferred from sqlalchemy.types import BigInteger, Integer, String, DateTime, Text, Float, Numeric, SmallInteger from sqlalchemy.dialects.mysql import ENUM from fidoweb.model.meta import Base """ Rul...
Python
import datetime from sqlalchemy import Table, Column, ForeignKey from sqlalchemy.orm import relation, backref, mapper from sqlalchemy.types import BigInteger, Integer, String, DateTime, Text, Boolean, Date from sqlalchemy.dialects.mysql import ENUM from fidoweb.model.meta import Base """ Rules 1. Tables and Inner r...
Python
"""SQLAlchemy Metadata and Session object""" from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import scoped_session, sessionmaker __all__ = ['Base', 'Session'] # SQLAlchemy session manager. Updated by model.init_model() Session = scoped_session(sessionmaker()) # The declarative Base Base =...
Python
"""The application's model objects""" from fidoweb.model.meta import Session, Base from fidoweb.model.homepageGalleryPic import * from fidoweb.model.map import * from fidoweb.model.user import * from fidoweb.model.locate import * from fidoweb.model.media import * from fidoweb.model.group import * def init_model(engin...
Python
from sqlalchemy import Table, Column, ForeignKey from sqlalchemy.orm import relation, backref from sqlalchemy.types import BigInteger, Integer, String, DateTime, Text from fidoweb.model.meta import Base from fidoweb.model.locate import City
Python
import datetime from sqlalchemy import Table, Column, ForeignKey from sqlalchemy.orm import relation, backref, mapper from sqlalchemy.types import BigInteger, Integer, String, DateTime, Text, Float, Boolean from fidoweb.model.meta import Base """ Rules 1. Tables and Inner relations are sorted in alphabet order, and...
Python
from sqlalchemy import Table, Column, ForeignKey from sqlalchemy.orm import relation, backref from sqlalchemy.types import BigInteger, Integer, String from fidoweb.model.meta import Base from fidoweb.model.locate import City from fidoweb.model.school import School
Python
#-- # Script to test the JavaScript hash algorithms # This produces an HTML file, that you load in a browser to run the tests #-- import hashlib, base64, hmac all_algs = ['md5', 'sha1', 'ripemd160', 'sha256', 'sha512'] short = {'ripemd160': 'rmd160'} test_strings = ['hello', 'world', u'fred\u1234'.encode('utf-8'), 'th...
Python
#-- # Script to test the JavaScript hash algorithms # This produces an HTML file, that you load in a browser to run the tests #-- import hashlib, base64, hmac all_algs = ['md5', 'sha1', 'ripemd160', 'sha256', 'sha512'] short = {'ripemd160': 'rmd160'} test_strings = ['hello', 'world', u'fred\u1234'.encode('utf-8'), 'th...
Python
"""Pylons application test package This package assumes the Pylons environment is already loaded, such as when this script is imported from the `nosetests --with-pylons=test.ini` command. This module initializes the application via ``websetup`` (`paster setup-app`) and provides the base testing objects. """ from unit...
Python
# -*- coding: utf-8 -*- import logging import hashlib import string import json from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from fidoweb.lib.base import Session, BaseController, render from fidoweb.lib.formChecker import FormChecker from f...
Python
# -*- coding: utf-8 -*- import logging import hashlib import string import json from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from fidoweb.lib.base import Session, BaseController, render from fidoweb.lib.formChecker import FormChecker from f...
Python
import logging import json from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from sqlalchemy import desc from sqlalchemy.exc import IntegrityError from fidoweb.lib.base import Session, BaseController, render from fidoweb.model.map import * log ...
Python
import logging import random import datetime import hashlib import json from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from fidoweb.lib.base import BaseController, render, Session from fidoweb.model.user import User, Profession from fidoweb.mo...
Python
import cgi from paste.urlparser import PkgResourcesParser from pylons.middleware import error_document_template from webhelpers.html.builder import literal from fidoweb.lib.base import BaseController class ErrorController(BaseController): """Generates error documents as and when they are required. The Error...
Python
import logging from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from fidoweb.lib.base import BaseController, render, Session from fidoweb.model.user import User, UserGroup, User_UserGroup log = logging.getLogger(__name__) class UserGroupContro...
Python
import logging import json from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from fidoweb.lib.base import Session, BaseController, render from fidoweb.model.homepageGalleryPic import * log = logging.getLogger(__name__) class HomepageController(...
Python
# -*- coding: cp936 -*- import logging from sqlalchemy import or_, desc from pylons import request, response, session, tmpl_context as c, url from pylons.controllers.util import abort, redirect from fidoweb.lib.base import Session, BaseController, render from fidoweb.lib.algorithm import checkTimeScope log = loggin...
Python