Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(615)  |  Call(216)  |  Derive(11)  |  Import(388)

src/z/a/zarkpy-HEAD/web/cgi/modeldecorator/UpdateTime.py   zarkpy(Download)
#coding=utf-8
import datetime
from Decorator import Decorator
import site_helper as sh
 
''' 自动记录数据最后一次的更新时间 '''
 
class UpdateTime(Decorator):

src/z/a/zarkpy-HEAD/web/cgi/modeldecorator/Tag.py   zarkpy(Download)
#coding=utf-8
from Decorator import Decorator
import site_helper as sh
 
# 标签装饰, 如果想对你的数据打标签,可以用此装饰
class Tag(Decorator):
    ''' decorator = [
        ('Tag', dict(tag_model_name='Tag', data_key='tags', split_char=' ', auto_operate='reset') ),
    ] '''
 

src/z/a/zarkpy-HEAD/web/cgi/modeldecorator/StringProcess.py   zarkpy(Download)
#coding=utf-8
from Decorator import Decorator
import site_helper as sh
 
# 字符串处理,可以有多个key和values,每个key对应一个str类的函数,比如strip、lower等
# 每个values是一个由多个属性名称组成的list,表示要处理的数据
 
class StringProcess(Decorator):

src/z/a/zarkpy-HEAD/web/cgi/modeldecorator/RecordRequestInfo.py   zarkpy(Download)
#coding=utf-8
import web
from Decorator import Decorator
import site_helper as sh
 
class RecordRequestInfo(Decorator):
    '''
    decorator = [
        ('RecordRequestInfo', dict(ip='ip', user_agent='HTTP_USER_AGENT', referrer='HTTP_REFERER') ),
    ]

src/z/a/zarkpy-HEAD/web/cgi/modeldecorator/Pagination.py   zarkpy(Download)
#coding=utf-8
import math
from Decorator import Decorator
import site_helper as sh
 
# 分页装饰, paging_key为页码属性名,paging_volume为每页数据量,paging指明是否自动开启分页功能
 
class Pagination(Decorator):

src/z/a/zarkpy-HEAD/web/cgi/modeldecorator/Orderby.py   zarkpy(Download)
#coding=utf-8
from Decorator import Decorator
import site_helper as sh
 
class Orderby(Decorator):

src/z/a/zarkpy-HEAD/web/cgi/modeldecorator/NotEmpty.py   zarkpy(Download)
#coding=utf-8
from Decorator import Decorator
 
# 断言insert和update的数据的某些字段必须存在,且不能为None和空字符串
# 在not_empty_attrs中设置需要验证的字段名称即可,比如 not_empty_attrs=['email','name','password']
 
class NotEmpty(Decorator):

src/z/a/zarkpy-HEAD/web/cgi/modeldecorator/EmptyModel.py   zarkpy(Download)
#coding=utf-8
from Decorator import Decorator
import site_helper as sh
 
# 空数据模式,不需要参数
 
class EmptyModel(Decorator):

src/z/a/zarkpy-HEAD/web/cgi/modeldecorator/Category.py   zarkpy(Download)
#coding=utf-8
from Decorator import Decorator
import site_helper as sh
 
# 分类装饰,如果你想对你的数据进行简单分类,那么可以使用此装饰
class Category(Decorator):
    ''' decorator = [
        ('Category',{'cat_id_key': 'Categoryid', 'cat_model_name': 'Category',
             'data_key': 'category_name', 'auto_new': True, 'auto_set': True}),
    ] '''

src/z/a/zarkpy-HEAD/web/cgi/modeldecorator/Cascade.py   zarkpy(Download)
#coding=utf-8
# ../testing/modeldecorator_test/TestCascade.py
from Decorator import Decorator
import site_helper as sh
 
class Cascade(Decorator):
    ''' decorator = [
        ('Cascade', dict(
            delete  =[('other_table', 'attr'), ],
            increase=[('other_table', 'attr'), ],

  1 | 2  Next