Pycharm創建Django項目並訪問Django
一、Django插件
如果沒有Django插件,需要先安裝Django插件。
1,首先點擊Default Settings,打開設置頁面:

2,打開Project Interpreter:

3,安裝一下Django插件:

二、創建Django工程
1,New Django:

2,設置Django admin 用戶名和密碼:

3,控制台中輸入如下命令:
# 初始化數據庫表 manage.py@diango > makemigrations manage.py@diango > migrate # 創建admin user manage.py@diango > createsuperuser Username (leave blank to use 'administrator'): admin Email address: admin@qq.com Warning: Password input may be echoed. Password: admin123456 Warning: Password input may be echoed. Password (again): admin123456
Superuser created successfully.
4,設置web啟動項:

5,勾選本機訪問:

6,按shitf+f9,使用debug運行項目,訪問http://127.0.0.1:8000/admin/,用剛才設置的用戶名密碼登錄:

7,進入系統:

