...
Go into the project folder that was created when the repo was cloned.
Start the project. Be sure to enter the
.
at the end of the command line in order to create the project in the current folder. Otherwise, django will create a subfolder with the project name and place it one level down.Code Block django-admin startproject <project name> .
Set the ALLOWED_HOSTS setting in the
settings.py
file. For example:Code Block ALLOWED_HOSTS = ["ece-li-scheduling-2.eng.uwaterloo.ca", "localhost", "127.0.0.1"]
Optional - add a
.gitignore
file to the root project directory. Add the filedb.sqlite3
to this.gitignore
file so that the SQLite database does not get stored in the git repo.
Push first commit
Create new branch
initialize
. The project access token is not permitted to push tomain
branch.Code Block git branch initialize git checkout initialize git push --set-upstream origin initialize
Commit the initial files created by django for the project.
Code Block git add . git commit -m "Initialize django project." git push
Merge the
initialize
branch intomain
branch.
...