- 博客(6)
- 收藏
- 关注
转载 Django认证——自定义后端和登录
一:指定后端 AUTHENTICATION_BACKENDS = ( 'authentication.authentication.CustomAuthenticationBackend',) 二:自定义后端 from django.contrib.auth import...
2016-11-11 22:02:00
295
转载 Django认证——自定义User模型和在adminsite中创建User
步骤如下: 一:在settings中指定用户模型 AUTH_USER_MODEL = 'authentication.CustomUser' authentication为app的名字,CustomUser为自定义的用户模型 二:定义用户模型和管理器 在authenticatio...
2016-11-11 09:29:00
605
转载 开发环境配置
安装vagrant 使用 Vagrant 打造跨平台开发环境 配置源 http://jingyan.baidu.com/article/454316ab6fb11af7a7c03ae0.html http://www.linuxidc.com/Linux/2016-06/13251...
2016-10-24 21:12:00
70
转载 类与成员
class Desk: def __init__(self): self.describe = "A desk" def color(self, color): self.color = color def get_color...
2016-10-22 12:08:00
81
转载 绑定方法
区分绑定方法和函数class Spam: def doit(self, message): print(message)print(Spam().doit)<bound method Spam.doit of <main.Spam object at...
2016-10-20 14:35:00
113
转载 Python os模块
os.name The name of the operating system dependent module imported.os.devnull The file path of the null device. 不知道用法##Environos.environ A mapp...
2016-10-19 21:34:00
88
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人