官术网_书友最值得收藏!

Problem details

Out of the box, Django provides a pretty decent user model. You can use it when you create a super user or login to the admin interface. It has a few basic fields, such as full name, username, and email.

However, most real-world projects keep a lot more information about users, such as their address, favorite movies, or their superpower abilities. From Django 1.5 onwards, the default user model can be extended or replaced. However, official docs strongly recommend storing only authentication data even in a custom user model (it belongs to the auth app, after all).

Certain projects need multiple types of users. For example, SuperBook can be used by superheroes and non-superheroes. There might be common fields and some distinctive fields based on the type of user.

主站蜘蛛池模板: 沽源县| 汶川县| 东安县| 广安市| 抚顺县| 宁津县| 云南省| 穆棱市| 黑水县| 平乐县| 马尔康县| 镇坪县| 乌拉特后旗| 马关县| 门头沟区| 德清县| 通城县| 上思县| 吉林省| 涟水县| 鸡泽县| 陕西省| 雅安市| 冀州市| 凤山市| 青海省| 兴仁县| 黄冈市| 北安市| 惠州市| 巴彦淖尔市| 和田市| 邳州市| 阿克陶县| 宜宾县| 连南| 塘沽区| 双鸭山市| 工布江达县| 桑植县| 阿克|