- 文档自动化管理 / Django REST framework的缓存 Throttling对用户和IP进行限速 -集成QQ/微信/微博第三方登录
- Authentication用户认证设置 动态设置Permission、Authentication Validators实现字段验证
- Serializer ModelSerializer 动态设置Serializer
- Apiview方式实现API接口 / GenericView方式实现API接口 Viewset和Router方式实现API接口和URL配置 Django_filter、SearchFilter、OrderFilter、分页 / 通用Mixins
- 使用Redis对Django REST framework常用且访问大的开放接口进行缓存加速 cp聚合博客--python后台
该平台采用Django2.0 xadmin restframework api 开发
- Django的版本要求必须是2.0版本,使之能和xadmin 对得上
- GitHub 上面的xadmin 对Django的版本的选择还是存在诸多问题
YUNZHIXUN_TOKEN = "****"
YUNZHIXUN_TEMPLATE_ID = "***"
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': "CpWebSourcePlatform",
'USER': 'root',
'PASSWORD': "*******",
'HOST': "*****",
'OPTIONS': {'init_command': 'SET default_storage_engine=INNODB;'}
}
}
urlpatterns = [
# authentication / association
url(r'^login/(?P<backend>[^/]+){0}$'.format(extra), views.auth,
name='begin'),
url(r'^complete/(?P<backend>[^/]+){0}$'.format(extra), views.complete,
name='complete'),
# disconnection
url(r'^disconnect/(?P<backend>[^/]+){0}$'.format(extra), views.disconnect,
name='disconnect'),
url(r'^disconnect/(?P<backend>[^/]+)/(?P<association_id>\d+){0}$'
.format(extra), views.disconnect, name='disconnect_individual'),
]