![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Django
ZbyFt
这个作者很懒,什么都没留下…
展开
-
Django3 swagger form表单
Django Swagger安装依赖djangorestframeworkdrf-yasgsettings.pyINSTALLED_APPS = [ ... 'rest_framework', 'drf_yasg', ...]SWAGGER_SETTINGS = { 'LOGIN_URL': '/admin/login', 'LOGOUT_URL': '/admin/logout', 'PERSIST_AUTH': True, 'R原创 2021-11-09 15:55:06 · 1012 阅读 · 0 评论 -
一级菜单 二级菜单 三级菜单处理逻辑
一级二级三级菜单处理逻辑 def query_role_permission(cls, permission_ids): # 一次性全部把数据取出来 permission_objs = Permission.objects.all() # 一级菜单 first_menu_objs = list() first_ids = list() first_dict = dict() for pe原创 2021-11-04 10:18:16 · 1090 阅读 · 0 评论 -
Django 项目总结
Django模型类1. 继承Django用户模型类class User(AbstractUser): """用户模型类""" mobile = models.CharField(max_length=11, unique=True, verbose_name='手机号') class Meta: db_table = 'tb_users' verbose_name = '用户' verbose_name_plural = verb原创 2021-04-12 17:40:14 · 755 阅读 · 0 评论