• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python rules.len_of函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中toughlib.btforms.rules.len_of函数的典型用法代码示例。如果您正苦于以下问题:Python len_of函数的具体用法?Python len_of怎么用?Python len_of使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了len_of函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: operator_add_form

def operator_add_form():
    return btforms.Form(
        btforms.Textbox("operator_name", rules.len_of(2, 32), description=u"操作员名称", required="required", **input_style),
        btforms.Textbox("operator_desc", rules.len_of(0, 255), description=u"操作员姓名", **input_style),
        btforms.Password("operator_pass", rules.len_of(6, 128), description=u"操作员密码", required="required",**input_style),
        btforms.Dropdown("operator_status", description=u"操作员状态", args=opr_status_dict.items(), required="required",**input_style),
        btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style),
        title=u"增加操作员",
        action="/operator/add"
    )
开发者ID:gvsurenderreddy,项目名称:toughwlan,代码行数:10,代码来源:operator_form.py


示例2: contact_add_form

def contact_add_form(groups=[]):
    return btforms.Form(
        btforms.Dropdown("contactgroup_name", description=u"联系人组",args=groups,required="required",**input_style),
        btforms.Textbox("contact_name", rules.len_of(1, 128), description=u"联系人名称",required="required",**input_style),
        btforms.Textbox("alias", rules.len_of(1, 128), description=u"联系人描述",required="required",**input_style),
        btforms.Textbox("email", rules.len_of(1, 128), description=u"电子邮件",required="required",**input_style),
        btforms.Textbox("pager", rules.len_of(1, 128), description=u"手机号码",required="required",**input_style),
        btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style),
        title=u"联系人增加",
        action="/contact/add"
    )()
开发者ID:lxyjyy,项目名称:ToughNMS,代码行数:11,代码来源:contact_form.py


示例3: operator_update_form

def operator_update_form():
    return btforms.Form(
        btforms.Hidden("id", description=u"编号"),
        btforms.Textbox("operator_name", description=u"操作员名称", readonly="readonly", **input_style),
        btforms.Textbox("operator_desc", rules.len_of(0, 255), description=u"操作员姓名", **input_style),
        btforms.Password("operator_pass", rules.len_of(0, 128), description=u"操作员密码(留空不修改)", autocomplete="off",**input_style),
        btforms.Dropdown("operator_status", description=u"操作员状态", args=opr_status_dict.items(), required="required",**input_style),
        btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style),
        title=u"修改操作员",
        action="/operator/update"
    )
开发者ID:gvsurenderreddy,项目名称:toughwlan,代码行数:11,代码来源:operator_form.py


示例4: host_update_form

def host_update_form(groups=[]):
    return btforms.Form(
        btforms.Dropdown("use", description=u"主机类型",args=host_uses.items(),required="required",**input_style),
        btforms.Dropdown("group_name", description=u"主机分组",args=groups,required="required",**input_style),
        btforms.Textbox("host_name", rules.len_of(1, 128), description=u"主机名称",readonly="readonly",**input_style),
        btforms.Textbox("alias", rules.len_of(1, 128), description=u"主机描述",required="required",**input_style),
        btforms.Textbox("address", rules.len_of(1, 128), description=u"主机地址",required="required",**input_style),
        btforms.Dropdown("notifications_enabled", args=state.items(), description=u"启动通知",**input_style), 
        btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style),
        title=u"主机修改",
        action="/host/update"
    )()
开发者ID:lxyjyy,项目名称:ToughNMS,代码行数:12,代码来源:host_form.py


示例5: isp_update_form

def isp_update_form():
    return btforms.Form(
        btforms.Textbox("isp_code", rules.len_of(4, 8), description=u"服务商编码", readonly="readonly", **input_style),
        btforms.Textbox("isp_name", rules.len_of(4, 64), description=u"服务商名称", **input_style),
        btforms.Textbox("isp_email", rules.len_of(0, 64), description=u"服务商Email", **input_style),
        btforms.Textbox("isp_phone", rules.len_of(0, 64), description=u"服务商电话", **input_style),
        btforms.Textbox("isp_idcard", rules.len_of(0, 32), description=u"服务商证件号码", **input_style),
        btforms.Textbox("isp_desc", description=u"服务商描述", **input_style),
        btforms.Button("submit", type="submit", html=u"<b>更新</b>", **button_style),
        title=u"修改服务商",
        action="/isp/update"
    )
开发者ID:gvsurenderreddy,项目名称:toughwlan,代码行数:12,代码来源:isp_forms.py


示例6: isp_add_form

def isp_add_form():
    return btforms.Form(
        btforms.Textbox("isp_code", rules.len_of(4, 8), description=u"服务商编码", required="required", **input_style),
        btforms.Textbox("isp_name", rules.len_of(4, 64), description=u"服务商名称", required="required", **input_style),
        btforms.Textbox("isp_email", rules.len_of(0, 64), description=u"服务商Email", **input_style),
        btforms.Textbox("isp_phone", rules.len_of(0, 64), description=u"服务商电话", **input_style),
        btforms.Textbox("isp_idcard", rules.len_of(0, 32), description=u"服务商证件号码", **input_style),
        btforms.Textbox("isp_desc", description=u"服务商描述", **input_style),
        btforms.Button("submit", type="submit", id="submit", html=u"<b>提交</b>", **button_style),
        title=u"增加服务商",
        action="/isp/add"
    )
开发者ID:gvsurenderreddy,项目名称:toughwlan,代码行数:12,代码来源:isp_forms.py


示例7: operator_add_form

def operator_add_form(nodes=[], products=[]):
    return btforms.Form(
        btforms.Textbox("operator_name", rules.len_of(2, 32), description=u"操作员名称", required="required", **input_style),
        btforms.Textbox("operator_desc", rules.len_of(0, 255), description=u"操作员姓名", **input_style),
        btforms.Password("operator_pass", rules.len_of(6, 128), description=u"操作员密码", required="required",**input_style),
        btforms.Dropdown("operator_status", description=u"操作员状态", args=opr_status_dict.items(), required="required",**input_style),
        btforms.Dropdown("operator_nodes", description=u"关联区域(多选)", args=nodes, required="required",multiple="multiple", size=4, **input_style),
        btforms.Dropdown("operator_products", description=u"关联资费(多选)", args=products, required="required",multiple="multiple", size=6, **input_style),
        btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style),
        title=u"增加操作员",
        action="/admin/operator/add"
    )
开发者ID:Evan-hu,项目名称:ToughRADIUS,代码行数:12,代码来源:operator_form.py


示例8: customer_update_form

def customer_update_form():
    return btforms.Form(
        btforms.Textbox("realname", description=u"用户姓名",readonly="readonly",**input_style),
        btforms.Textbox("customer_name", description=u"用户登陆名", readonly="readonly",**input_style),
        btforms.Password("new_password", rules.len_of(0,128),value="", description=u"用户登陆密码(留空不修改)", **input_style),
        btforms.Textbox("email", rules.len_of(0,128), description=u"电子邮箱", **input_style),
        # btforms.Textbox("idcard", rules.len_of(0,32), description=u"证件号码", **input_style),
        # btforms.Textbox("mobile", rules.len_of(0,32),description=u"用户手机号码", **input_style),
        btforms.Textbox("address", description=u"用户地址",hr=True, **input_style),
        btforms.Button("submit",  type="submit", html=u"<b>提交</b>", **button_style),
        title=u"用户基本信息修改",
        action="/customer/user/update"
    )
开发者ID:davislidaqing,项目名称:ToughRADIUS,代码行数:13,代码来源:forms.py


示例9: service_add_form

def service_add_form():
    return btforms.Form(
        btforms.Dropdown("use", description=u"服务类型",args=service_uses.items(),required="required",**input_style),
        btforms.Textbox("host_name", description=u"主机名称",readonly="readonly",**input_style),
        btforms.Textbox("service_description", rules.len_of(1, 128), description=u"服务描述",required="required",**input_style),
        btforms.Textbox("check_command", rules.len_of(1, 512), description=u"检测命令",required="required",help=u"命令参考",**input_style),
        btforms.Textbox("max_check_attempts", rules.is_number, description=u"最大重试次数",required="required",**input_style),
        btforms.Textbox("normal_check_interval", rules.is_number, description=u"检测间隔时间(分)",value=5, required="required",**input_style),
        btforms.Textbox("retry_check_interval", rules.is_number, description=u"重试间隔时间(分)",value=1,required="required",**input_style),
        btforms.Dropdown("notifications_enabled", args=state.items(), description=u"启动通知",**input_style),  
        btforms.Dropdown("process_perf_data", args=state.items(), description=u"启动性能统计",**input_style),              
        btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style),
        title=u"服务增加",
        action="/service/add"
    )()
开发者ID:lxyjyy,项目名称:ToughNMS,代码行数:15,代码来源:service_form.py


示例10: customer_join_form

def customer_join_form(nodes=[]): 
    return btforms.Form(
        btforms.Dropdown("node_id", description=u"区域", args=nodes,required="required", **input_style),
        btforms.Textbox("realname", rules.len_of(2,32), description=u"用户姓名(必填)", required="required",**input_style),
        btforms.Dropdown("sex", description=u"性别", args=sexopt.items(),required="required", **input_style),
        btforms.Textbox("age", rules.is_number, description=u"年龄(必填)", size=3,required="required",**input_style),
        btforms.Textbox("username", rules.is_alphanum3(6, 32), description=u"用户名(必填)", size=32,required="required",**input_style),
        btforms.Password("password", rules.len_of(6,32), description=u"登录密码(必填)", size=32, required="required",**input_style),
        btforms.Textbox("email", rules.is_email, description=u"电子邮箱(必填)", size=64,required="required",**input_style),
        btforms.Textbox("idcard", rules.len_of(0,32), description=u"证件号码", **input_style),
        btforms.Textbox("mobile", rules.len_of(0,32),description=u"用户手机号码", **input_style),
        btforms.Textbox("address", description=u"用户地址",hr=True, **input_style),
        btforms.Button("submit", type="submit", html=u"<b>注册</b>", **button_style),
        action="/customer/join",
        title=u"用户注册"
    )
开发者ID:davislidaqing,项目名称:ToughRADIUS,代码行数:16,代码来源:forms.py


示例11: bas_add_form

def bas_add_form(isps=[]):
    return btforms.Form(
        btforms.Dropdown("isp_code", isps, description=u"服务商", required="required", **input_style),
        btforms.Textbox("ip_addr", rules.is_ip, description=u"设备地址", required="required", **input_style),
        btforms.Textbox("bas_name", rules.len_of(2, 64), description=u"设备名称", required="required", **input_style),
        btforms.Textbox("dns_name", rules.len_of(1, 128), description=u"DNS域名", help=u"动态IP专用", **input_style),
        btforms.Textbox("bas_secret", rules.is_alphanum2(4, 32), description=u"共享秘钥", required="required", **input_style),
        btforms.Dropdown("vendor_id", description=u"设备类型", args=bastype.items(), required="required", **input_style),
        btforms.Dropdown("portal_vendor", description=u"portal协议", args=portaltype.items(), required="required", **input_style),
        btforms.Dropdown("time_type", description=u"时区类型", args=timetype.items(), required="required", **input_style),
        btforms.Textbox("ac_port", rules.is_number, description=u"AC端口", default=2000, required="required",**input_style),
        btforms.Textbox("coa_port", rules.is_number, description=u"CoA端口", default=3799, required="required",**input_style),
        btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style),
        title=u"增加接入设备",
        action="/bas/add"
    )
开发者ID:gvsurenderreddy,项目名称:toughwlan,代码行数:16,代码来源:nas_forms.py


示例12: customer_update_form

def customer_update_form(nodes=[]):
    return btforms.Form(
        btforms.Hidden("account_number", description=u"用户账号"),
        btforms.Hidden("customer_id", description=u"mid", required="required", **input_style),
        btforms.Textbox("realname", rules.len_of(2, 32), description=u"用户姓名", required="required", **input_style),
        btforms.Textbox("customer_name", description=u"自助服务用户名", readonly="readonly", autocomplete="off", **input_style),
        btforms.Password("new_password", rules.len_of(0, 128), value="", description=u"自助服务密码(留空不修改)", **input_style),
        btforms.Textbox("email", rules.len_of(0, 128), description=u"电子邮箱", **input_style),
        btforms.Textbox("idcard", rules.len_of(0, 32), description=u"证件号码", **input_style),
        btforms.Textbox("mobile", rules.len_of(0, 32), description=u"用户手机号码", **input_style),
        btforms.Textbox("address", description=u"用户地址", hr=True, **input_style),
        btforms.Textarea("customer_desc", description=u"用户描述", rows=4, **input_style),
        btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style),
        title=u"用户基本信息修改",
        action="/admin/customer/update"
    )
开发者ID:Evan-hu,项目名称:ToughRADIUS,代码行数:16,代码来源:customer_forms.py


示例13: tpl_add_form

def tpl_add_form():
    return btforms.Form(
        btforms.Textbox("tpl_name", rules.len_of(4, 64), description=u"模版名称", required="required", **input_style),
        btforms.Textarea("tpl_desc", description=u"模版描述", rows=4, **input_style),
        btforms.Button("submit", type="submit", id="submit", html=u"<b>提交</b>", **button_style),
        title=u"增加模版",
        action="/template/add"
    )
开发者ID:gvsurenderreddy,项目名称:toughwlan,代码行数:8,代码来源:template_forms.py


示例14: tpl_update_form

def tpl_update_form():
    return btforms.Form(
        btforms.Hidden("id", description=u"编号"),
        btforms.Textbox("tpl_name", rules.len_of(4, 64), description=u"模版名称", readonly="readonly", **input_style),
        btforms.Textarea("tpl_desc", description=u"模版描述", rows=4, **input_style),
        btforms.Button("submit", type="submit", html=u"<b>更新</b>", **button_style),
        title=u"修改模版",
        action="/template/update"
    )
开发者ID:gvsurenderreddy,项目名称:toughwlan,代码行数:9,代码来源:template_forms.py


示例15: customer_open_form

def customer_open_form(nodes=[], products=[]):
    return btforms.Form(
        btforms.Dropdown("node_id", description=u"区域", args=nodes, required="required", **input_style),
        btforms.Textbox("realname", rules.len_of(2, 32), description=u"用户姓名", required="required", **input_style),
        btforms.Checkbox("is_samename", description=u"启用独立的自助服务用户名", checked=""),
        btforms.Textbox("customer_name", rules.len_of(0, 64), description=u"自助服务用户名", **input_style),
        btforms.Textbox("customer_password", rules.len_of(0, 128), description=u"自助服务用户密码", **input_style),
        btforms.Textbox("idcard", rules.len_of(1, 32), description=u"证件号码", **input_style),
        btforms.Textbox("mobile", rules.len_of(1, 32), description=u"用户手机号码", **input_style),
        btforms.Textbox("address",rules.len_of(1, 32), description=u"用户地址", hr=True, required="required", **input_style),
        btforms.Textbox("account_number", description=u"用户账号", required="required", **input_style),
        btforms.Textbox("password", description=u"认证密码", required="required", **input_style),
        btforms.Button("button", type="button", onclick="reBuildAccount();", html=u"<b>重新生成账号密码</b>", **_btn_style),
        btforms.Textbox("ip_address", description=u"用户IP地址", **input_style),
        btforms.Dropdown("product_id", args=products, description=u"资费", required="required", **input_style),
        btforms.Textbox("months", rules.is_number, description=u"月数(包月有效)", required="required", **input_style),
        btforms.Textbox("giftdays", rules.is_number, description=u"赠送天数", value=0, required="required", **input_style),
        btforms.Textbox("fee_value", rules.is_rmb, description=u"缴费金额", required="required", **input_style),
        btforms.Textbox("expire_date", rules.is_date, description=u"过期日期", readonly="readonly", **input_style),
        btforms.Hidden("status", value=1, description=u"用户状态", **input_style),
        btforms.Textarea("customer_desc", description=u"用户描述", rows=4, **input_style),
        btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style),
        title=u"用户开户",
        action="/admin/customer/open"
    )
开发者ID:niebaopeng,项目名称:ToughRADIUS,代码行数:25,代码来源:customer_forms.py


示例16: account_change_form

def account_change_form(products=[]):
    return btforms.Form(
        btforms.Hidden("account_number", description=u"用户账号", required="required", **input_style),
        btforms.Dropdown("product_id", args=products, description=u"资费", required="required", **input_style),
        btforms.Textbox("add_value", rules.is_rmb, description=u"缴费金额", required="required", value="0", **input_style),
        btforms.Textbox("back_value", rules.is_rmb, description=u"退费金额", required="required", value="0", **input_style),
        btforms.Textbox("expire_date", rules.is_date, description=u"过期日期", value="0000-00-00", **input_style),
        btforms.Textbox("balance", rules.is_rmb, description=u"用户变更后余额", value="0.00", **input_style),
        btforms.Textbox("time_length", description=u"用户时长(小时)", value="0.00", **input_style),
        btforms.Textbox("flow_length", description=u"用户流量(MB)", value="0", **input_style),
        btforms.Textarea("operate_desc", rules.len_of(0, 512), description=u"操作描述", rows=4, **input_style),
        btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style),
        title=u"用户资费变更",
        action="/admin/account/change",
    )
开发者ID:muxuejin,项目名称:ToughRADIUS,代码行数:15,代码来源:account_forms.py


示例17: product_add_form

def product_add_form():
    return btforms.Form(
        btforms.Textbox("product_name", rules.len_of(4, 64), description=u"资费名称", required="required", **input_style),
        btforms.Dropdown("product_policy", args=product_policy.items(), description=u"计费策略", required="required",**input_style),
        btforms.Textbox("fee_months", rules.is_number, description=u"买断授权月数", value=0, **input_style),
        btforms.Textbox("fee_times", rules.is_number3, description=u"买断时长(小时)", value=0, **input_style),
        btforms.Textbox("fee_flows", rules.is_number3, description=u"买断流量(MB)", value=0, **input_style),
        btforms.Textbox("fee_price", rules.is_rmb, description=u"资费价格(元)", required="required", **input_style),
        # btforms.Hidden("fee_period", rules.is_period, description=u"开放认证时段", **input_style),
        btforms.Textbox("concur_number", rules.is_numberOboveZore, description=u"并发数控制(0表示不限制)", value="0",**input_style),
        btforms.Dropdown("bind_mac", args=boolean.items(), description=u"是否绑定MAC ", **input_style),
        btforms.Dropdown("bind_vlan", args=boolean.items(), description=u"是否绑定VLAN ", **input_style),
        btforms.Textbox("input_max_limit", rules.is_number3, description=u"最大上行速率(Mbps)", required="required",**input_style),
        btforms.Textbox("output_max_limit", rules.is_number3, description=u"最大下行速率(Mbps)", required="required",**input_style),
        btforms.Dropdown("product_status", args=product_status_dict.items(), description=u"资费状态", required="required",**input_style),
        btforms.Button("submit", type="submit", id="submit", html=u"<b>提交</b>", **button_style),
        title=u"增加资费",
        action="/admin/product/add"
    )
开发者ID:Evan-hu,项目名称:ToughRADIUS,代码行数:19,代码来源:product_forms.py


示例18:

boolean = {0: u"否", 1: u"是"}
timetype = {0: u"标准时区,北京时间", 1: u"时区和时间同区"}
bastype = {
    '0': u'标准',
    '3041': u'阿尔卡特',
    '2352': u'爱立信',
    '2011': u'华为',
    '25506': u'H3C',
    '3902': u'中兴',
    '10055': u'爱快',
    '14988': u'RouterOS'
}

bas_add_form = btforms.Form(
    btforms.Textbox("ip_addr", rules.is_ip, description=u"接入设备地址",  **input_style),
    btforms.Textbox("dns_name", rules.len_of(1, 128), description=u"DNS域名", help=u"动态IP专用", **input_style),
    btforms.Textbox("bas_name", rules.len_of(2, 64), description=u"接入设备名称", required="required", **input_style),
    btforms.Textbox("bas_secret", rules.is_alphanum2(4, 32), description=u"共享秘钥", required="required", **input_style),
    btforms.Dropdown("vendor_id", description=u"接入设备类型", args=bastype.items(), required="required", **input_style),
    btforms.Textbox("coa_port", rules.is_number, description=u"授权端口", default=3799, required="required",**input_style),
    btforms.Dropdown("time_type", description=u"时间类型", args=timetype.items(), required="required", **input_style),
    btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style),
    title=u"增加接入设备",
    action="/admin/bas/add"
)

bas_update_form = btforms.Form(
    btforms.Hidden("id", description=u"编号"),
    btforms.Textbox("dns_name", rules.len_of(1, 128), description=u"DNS域名", help=u"动态IP专用", **input_style),
    btforms.Textbox("ip_addr", rules.is_ip, description=u"接入设备地址",  **input_style),
    btforms.Textbox("bas_name", rules.len_of(2, 64), description=u"接入设备名称", required="required", **input_style),
开发者ID:Evan-hu,项目名称:ToughRADIUS,代码行数:31,代码来源:bas_forms.py


示例19:

boolean = {0: u"否", 1: u"是"}
timetype = {0: u"标准时区,北京时间", 1: u"时区和时间同区"}
bastype = {
    '0': u'标准',
    '3041': u'阿尔卡特',
    '2352': u'爱立信',
    '2011': u'华为',
    '25506': u'H3C',
    '3902': u'中兴',
    '10055': u'爱快',
    '14988': u'RouterOS'
}

bas_add_form = btforms.Form(
    btforms.Textbox("ip_addr", rules.is_ip, description=u"接入设备地址", required="required", **input_style),
    btforms.Textbox("bas_name", rules.len_of(2, 64), description=u"接入设备名称", required="required", **input_style),
    btforms.Textbox("bas_secret", rules.is_alphanum2(4, 32), description=u"共享秘钥", required="required", **input_style),
    btforms.Dropdown("vendor_id", description=u"接入设备类型", args=bastype.items(), required="required", **input_style),
    btforms.Textbox("coa_port", rules.is_number, description=u"授权端口", default=3799, required="required",**input_style),
    btforms.Dropdown("time_type", description=u"时间类型", args=timetype.items(), required="required", **input_style),
    btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style),
    title=u"增加接入设备",
    action="/admin/bas/add"
)

bas_update_form = btforms.Form(
    btforms.Hidden("id", description=u"编号"),
    btforms.Textbox("ip_addr", rules.is_ip, description=u"接入设备地址", readonly="readonly", **input_style),
    btforms.Textbox("bas_name", rules.len_of(2, 64), description=u"接入设备名称", required="required", **input_style),
    btforms.Textbox("bas_secret", rules.is_alphanum2(4, 32), description=u"共享秘钥", required="required", **input_style),
    btforms.Dropdown("vendor_id", description=u"接入设备类型", args=bastype.items(), required="required", **input_style),
开发者ID:davisldq,项目名称:ToughRADIUS,代码行数:31,代码来源:bas_forms.py


示例20:

from toughlib.btforms.rules import button_style, input_style
from toughradius.manage.settings import * 

tpl_types = {
    OpenNotify : u'用户开户通知模板',
    NextNotify : u'用户续费通知模板',
    ExpireNotify : u'用户到期通知模板',
    # InstallNotify : u'装机工单通知模板',
    # MaintainNotify : u'维修工单通知模板',
    # OpenNoteRemark : u'开户票据打印备注模板',
    # NextNotePrint : u'续费票据打印备注模板',
    # RefundNodeRemark : u'退费票据打印备注模板'
}

content_tpl_add_form = btforms.Form(
    btforms.Dropdown("tpl_type", args=tpl_types.items(), description=u"模板类型", required="required", **input_style),
    btforms.Textarea("tpl_content", rules.len_of(2, 128), description=u"模板内容", rows=7,required="required", **input_style),
    btforms.Button("submit", type="submit", html=u"<b>提交</b>", **button_style),
    title=u"增加模板",
    action="/admin/contenttpl/add"
)

content_tpl_update_form = btforms.Form(
    btforms.Hidden("id", description=u"模板ID"),
    btforms.Dropdown("tpl_type", args=tpl_types.items(), description=u"模板类型", **input_style),
    btforms.Textarea("tpl_content", rules.len_of(2, 128), description=u"模板内容",rows=7, required="required", **input_style),
    btforms.Button("submit", type="submit", html=u"<b>更新</b>", **button_style),
    title=u"修改模板",
    action="/admin/contenttpl/update"
)
开发者ID:muxuejin,项目名称:ToughRADIUS,代码行数:30,代码来源:content_tpl_forms.py



注:本文中的toughlib.btforms.rules.len_of函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python dbengine.get_engine函数代码示例发布时间:2022-05-27
下一篇:
Python api.current_question函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap