The django backend works with these extra modules
- django rest framework
- Easily making REST API's
- simpleJWT
- simple json web tokens for the cookies and authentication
The first thing to do is to clone the repository:
$ git clone [email protected]:SELab-2/Dr-Trottoir-5.git
$ cd Dr-Trottoir-5
$ cd backend
Create a virtual environment to install dependencies in and activate it:
$ virtualenv2 --no-site-packages env
$ source env/bin/activate
Then install the dependencies:
(env)$ pip install -r requirements.txt
Note the (env)
in front of the prompt. This indicates that this terminal
session operates in a virtual environment set up by virtualenv2
.
Once pip
has finished downloading the dependencies:
Download and install postgresql from here. Make an empty database and a user for this project.
In the backend directory. Copy the env file and fill in you own values. The location of .env should be in the same location of settings.py:
(env)$ cp .env.example .env
(env)$ python manage.py runserver
And navigate to http://127.0.0.1:8000
.
Todo setup tests and testing environment