- Install Python
- Install Python Package Manager (pip/pip3) :
apt-get install python-pip
apt-get install python3-pip
- Install virtualenv :
apt-get install virtualenv
- Clone the repository -
git clone <remote-url>
- Go to the project directory -
cd <cloned-repo>
- Set up the environment :
- Create virtual environment files -
virtualenv -p python3 venv
- Activate virtual environment -
source venv/bin/activate
- Create virtual environment files -
- Install dependencies -
pip3 install -r requirements.txt
- Copy contents of
.env.example
to a new file.env
-cp .env.example .env
- Make migrations -
python3 manage.py makemigrations
- Run migrations -
python3 manage.py migrate
- Start server -
python3 manage.py runserver
- Everytime you install packages or run the server, activate your virtual environment -
source venv/bin/activate
- To deactivate the activated virtual environment - run the command
deactivate
in terminal. - If you ran into any errors while running the server with python version incompatabilities, try
python3
instead ofpython
while running the server. - If you install any python packages, please update the file
requirements.txt