forked from ProjectXV/GlamourHaven
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackend_instructions
33 lines (23 loc) · 1.28 KB
/
backend_instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
instructions on how to run the backend server:
open the project folder (Glamourhaven/backend) in vs code or cmd terminal on your local machine
if you are using vscode open the vscode terminal
run this command to install a virtual environment:
$ virtualenv venv
then activate the virtual environment from the directory you have installed the venv, in our case the current directory
$ . venv/bin/activate (for Linux)
$ . venv/scripts/activate (for Windows OS)
create a .env file in the settings folder and add:
SECRET_KEY=django-insecure-2_qc*r!+#jy8b(r1603zbbu(bmcqp6@0g#lr-v*zj0wykcu$c6
EMAIL_HOST_PASSWORD=zreehnpyewwxozrp
then save
run the following command to install django in your virtual environment
$ pip install django (might say requirement satisfied)
while in the backend directorate, run the following command to install all necessary packages
$ pip install -r requirements.txt
remember to run migrations as below after installing them
next run the commands below to migrate models to the database
$ python manage.py makemigrations
$ python manage.py migrate
next command will run the server
$ python manage.py runserver