D2 建立资料库表格、创建管理者帐户、登入後台

今天花一点时间理解了怎麽进入admin後台
移动到主目录,使用下列指令让SQLite资料库(预设是SQLite,依照自己的需求可以替换)
建立所有需要的初始化Table

python manage.py migrate

会跳出类似下列的输出表示已经安装了这四个app(admin, auth, contenttypes, sessions)

Operations to perform:
  Apply all migrations: admin, auth, contenttypes, sessions
Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying auth.0010_alter_group_name_max_length... OK
  Applying auth.0011_update_proxy_permissions... OK
  Applying auth.0012_alter_user_first_name_max_length... OK
  Applying sessions.0001_initial... OK

移动到主目录,使用下列指令建立管理员

python manage.py createsuperuser

跳出以下设定帐号密码的程序

Username (leave blank to use 'mark'): admin
Email address: [email protected]
Password:
Password (again):
Superuser created successfully.

浏览器进入 http://127.0.0.1:8000/admin/
输入你的admin帐密
Imgur
之後会成功进入後台
Imgur


<<:  [Day08] JavaScript - 回圈_part 2

>>:  [Day7] IoT Maker之Coding知识科普 - (Variable)

Day 28: 初始化要测试的component

来,今天我们来聊一下怎麽帮redux在测试时添加初始化的状态资料,借用昨天的程序,并增加store的...

IT铁人DAY 17-State 状态模式

  今天介绍的State Pattern与昨天的Strategy Pattern非常的相似,不过它们...

找LeetCode上简单的题目来撑过30天啦(DAY3)

各位中秋节连假愉快,我今天坐客运,还包车了呢,司机先生只载我一个人,运气不错,好啦今天也要继续努力解...

postman

昨天介绍了API,今天要介绍一个postman的应用程序,它是一个可以让我们检查和实作API的app...

[Report] 怎麽插入图片

插入图表 插入图表的方式有2种 1.右键插入图表(Image) 2.从Toolbox拖拉图表过来 再...