-
Clone the repo and
cdinto it -
Create a Python 3 virtual environment
sudo apt install python3-dev python-virtualenv
virtualenv --python=/usr/bin/python3 ve
veis the name of the virtual environment -
Activate the virtual environment
source ve/bin/activate -
Install the requirements
pip install -r requirements.txt
-
Install PostgreSQL
sudo apt install postgresql postgresql-contrib libpq-dev
-
Open the PostgreSQL shell
sudo -u postgres psql postgres
-
Create a user with the name
devCREATE USER dev;
-
Create a database with the name
emsCREATE DATABASE ems OWNER dev;
Now exit the PostgreSQL shell by entering
\q. You should be back in the shell withveactivated -
Apply migrations
python3 manage.py migrate
python3 manage.py createsuperuser --username adminSetup is now complete! 🎉
First, make sure that the virtual environment we created, i.e. ve, is activated. Then run
python3 manage.py runserverOnce the development server has started, you may visit http://127.0.0.1:8000/ to check out the app.
