当前位置:网站首页>DRF -- users user module
DRF -- users user module
2022-07-22 04:57:00 【chuntian_ tester】
When Django Self contained User When the model class does not meet the requirements, you can customize User Model
1. establish users Subapplication
python manage.py startapp users
2. register users Subapplication
3. Definition users Model class
3.1 Inherit django Of user Model
from django.contrib.auth.models import User
3.2 Definition User Fields that are not available in the model but you need
3.3 Specify in the global configuration file to use custom UserModel Model class , And no longer applicable django Self contained auth.User Model class
3.3.1 If not customized , Will use django Self contained auth.User Model class
3.3.2 Set customized in the configuration file UserModel
AUTH_USER_MODEL = 'users.models.UserModel'
边栏推荐
- win10超好看的鼠标主题,你也来试试吧
- 中信科移动通过注册:拟募资40亿 光谷诞生研发5G的上市企业
- 打假AI无主灯,欧瑞博、艾拉物联、绿米Aqara谁是玩真的?
- 优秀的 Verilog/FPGA开源项目介绍(二十九)- 开源网站
- Musk uploaded that his brain was crazy, but neuralink was already a chicken feather
- Understand the volatile implementation of JVM from the bottom, CPU cache, cache consistency MESI, store bufferi, nvalidate queue and other knowledge
- Sdl2 concise tutorial (I): using cmake and Conan to build sdl2 programming environment
- 300. Longest increasing subsequence
- 柠萌影视通过聆讯:年营收12亿 腾讯与芒果文创是股东
- flink操作hudi数据表
猜你喜欢
随机推荐
Hcip notes sorting 2022/7/14
《安富莱嵌入式周报》第274期:2022.07.11--2022.07.17
go语言环境搭建和样例
Academia vs industry: can deep learning break the ceiling of video coding and decoding
让Matplotlib、Seaborn数据图动起来~
打假AI无主灯,欧瑞博、艾拉物联、绿米Aqara谁是玩真的?
七月集训(第21天) —— 堆(优先队列)
Some problems in the idea have been solved (the package problem handling method cannot be found, and the download has been completed, but the idea cannot detect the package)
SSM框架学习
leetcode:814. Binary tree pruning [DFS]
Relevant contents of automatic encoder
SDL2 简明教程(三):显示图片
Nacos相关概念小总结
继承,重写,重载
[BSP video tutorial] BSP video tutorial No. 20: play with serial port special topics, Hal library, ll library and register implementation methods, as well as learning several key sequence diagrams in
百度touch.js
Cesium加载3D Tiles数据
A little cool, use Net Maui exploring space
polardb for postgresql有进入信创数据库名单吗?
Alicloud ECS manually attaching disks