Django uses step

 

install Django PIP 
Django - ADMIN startproject mysite 
Tree 

Django - ADMIN startapp mysite_user 
Django - ADMIN startapp mysite_blog 
Tree 
cd mysite 
LS 
python3 manage.py - Help 

python3 manage.py the runserver             # start the service 
python3 manage.py the runserver 8080         # to change the port 
python3 manage.py flush             # empty database 
python3 manage.py createsuperuser         # create a super user 
python3 manage.py changepssword the user         # modify user password
manage.py shell python3             # default will enter IPython 
python3 manage.py startapp TestModel         # create APP, model definition 
python3 manage.py dbshell             # into the database 
python3 manage.py makemigrations TestModel       # let Django know we have some changes in our model 
python3 manage the migrate .py             # create the table structure 

vim settings.py                 # profiles

 

Guess you like

Origin www.cnblogs.com/linyouyi/p/11409927.html