• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






无名小妖

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2017年3月10日

from 动态显示select数据
摘要: 一、 ModelChoiceField(ChoiceField) ... django.forms.models.ModelChoiceField queryset, # 查询数据库中的数据 empty_label=" ", # 默认空显示内容 to_field_name=None, # HTML中 阅读全文
posted @ 2017-03-10 15:26 无名小妖 阅读(500) 评论(0) 推荐(0)
 
views获取数据 -- request包含的方法
摘要: request.GET request.POST request.FILES request.path_info request.xxx.getlist request.method request.COOKIES request.DELETE request.META request.body(所 阅读全文
posted @ 2017-03-10 11:58 无名小妖 阅读(269) 评论(0) 推荐(0)
 
CBV 验证装饰器的使用
摘要: 下面是3种方式: 阅读全文
posted @ 2017-03-10 11:58 无名小妖 阅读(174) 评论(0) 推荐(0)
 
django -- 自定义simpletag 和 filter
摘要: django中自定义simpletag,即使用自己定义的函数在html中处理数据。 步骤: 1、创建并注册app settings.py 2、在此app下创建目录templatetags 3、在templatetags目录下创建任意py文件,在文件中创建template对象register 4.修改 阅读全文
posted @ 2017-03-10 10:45 无名小妖 阅读(468) 评论(0) 推荐(0)