首页 > 技术文章 > django 创建admin用户名跟密码

a-dong 2019-03-07 19:14 原文

一.django中创建用户名和密码

  

(venv) D:\project\py37project\Djangopro\Procrm>Python37 manage.py createsuperuser

Username (leave blank to use 'administrator'): admin
Email address: 2180633571@qq.com
Password:
Password (again):
This password is too common.
Bypass password validation and create user anyway? [y/N]: y
Superuser created successfully.
View Code

 

二.models 警告

WARNINGS:
crm.Customer.tags: (fields.W340) null has no effect on ManyToManyField.
crm.UserProfile.roles: (fields.W340) null has no effect on ManyToManyField.
View Code

你在 ManyToManyField 上有个 null 的参数。migration 提醒你 null 在 ManyToManyField 上无效

 

推荐阅读