This is the django back end for the MVK project "Tinder for trucks".
- Python 3.8
- Intellij IDEA or PyCharm (Optional, recommended)
- Docker & docker-compose
- Start the docker daemon
- Open a terminal (e.g CMD for Windows)
- Navigate to the root directory of the project
- Run the command
docker-compose up -d
- In order to shutdown the development server, run the command
docker-compose down
- Start the development server
- Run the command
docker-compose run web python manage.py makemigrations
in order to make database migrations. - Run the command
docker-compose run web python manage.py migrate
in order to apply the migrations. - Run the command
docker-compose run web python manage.py createsuperuser
and follow the prompts in order to create a superuser for the database. - Repeat steps 1-3 whenever you make a change to any of the
models.py
files in the project.
Descriptions of the directories in this repository.
This directory contains the django-app account
which manages the account configurations for the project.
This includes:
- User database models
- Password reset
- Any views required to access the above functionality
This directory contains the django-app api
which holds all the endpoints that relate to this project specifically.
This feature-set includes:
- Any required models, such as
Cargo
,Shipment
&Truck
- All views for the decided endpoints
This directory contains the common configuration of the project.
Always create a new branch when developing a new feature and name it like feature/descriptive-name
where descriptive-name
is a suitable name to describe the feature.
Whenever a feature is complete, make a pull request towards the master
-branch in order to merge the feature.
This way of working is common within larger teams and companies and so is good to get used to.