Django是1.11,Python3.6,Mac OS
中英文混杂,主要为为自己记录用,时间有限,见谅。
Remove the related contents from base.py accordingly.
Edit manage.py and replace os.environ.setdefault("DJANGO_SETTINGS_MODULE", “project_name.settings") with os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project_name.settings.local")
Or you can set env variable:
$export DJANGO_SETTINGS_MODULE = project_name.settings.local
Or you can directly run manage.py with settings options.e.g:
$python manage.py runserver —settings=project_name.settings.local
$python manager.py createsuperuser (to create a super user account)
Openhttp://127.0.0.1:8000/, you should see the successful message.
You also can loginhttp://127.0.0.1:8000/admin using the super user. There you can create and update groups and users.
You can use pip freeze to save a list for installed packages.
$pip freeze > requirements.txt
(You can use $pip install-r requirements.txt to install all the packages for dependency)