Skip to content

AlexMuia31/Team-213-A-Back-End

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Team-213-A-Back-End

Codacy Badge

Installation and Setup

Fork the repo

You first need to fork the repo from either Team-213-A-Back-End or Team-213-A-Front-End depending on your stack.

Clone the repo

Clone the forked repo

git clone git@github.com:[username]/Team-213-A-Back-End.git
or
git clone git@github.com:[username]/Team-213-A-Front-End.git

Create a virtual environment

There are several ways depending on the OS and package you choose. Here's my favorite
sudo apt-get install python3-pip
pip3 install virtualenv
Then either
python3 -m venv venv
or
python -m venv venv
or
virtualenv venv (you can call it venv or anything you like)

Activate the virtual environment

source venv/bin/activate

Install the requirements

Within the activated virtual environment run:

pip3 install -r requirements.txt
or
pip install -r requirements.txt

Environment tweaks

Environment Variables are handled by python-decouple.
In the same folder as manage.py, add a file called .env.
Inside it, set the variables in this format:

SECRET_KEY=s3cr3tk3y
DEBUG=True
ALLOWED_HOSTS=127.0.0.1, .localhost, .herokuapp.com

Access the variables within settings.py, example:

from decouple import config
...
...
SECRET_KEY = config('SECRET_KEY')
DEBUG = config('DEBUG', cast=bool)
TIME_ZONE = config('TIME_ZONE')

Read the Python Decouple Documentation for more information.

Run the surver locally

python manage.py migrate
python manage.py runserver

Contributors

License

The project is licensed under the MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%