Install Django
Create a project
Create a secret file:
You need to redo this step when cloning the repository.
This creates a skeleton folder structure.
Start the development server
This is always useful during development
Create a new app
This creates a folder named "cars". The folder contains
Add the new app to "travelclean_gui/settings.py":
Add a superuser
The superuser has access to the admin pages. Check out http://0.0.0.0:8000/admin
.
Add a model (data in the database)
cars/models.py
You need to update the database to reflect the new model:
This will add the table into the database. It does not contain any data, since we didn't create a camera yet.
The easiest way to change the data is to add the model to admin:
cars/admin.py
Add a URL and view
travelclean_gui/urls.py:
cars/urls.py:
cars/views.py
Add a view to interact with the model
cars/urls.py
cars/views.py
cars/templates/cars/camera_list.html
cars/templates/cars/camera_detail.html
Add a form for changing the data