Source code of Project from the Django Mastery Youtube Channel
- Python
- Docker
- Nginx
- Postgresql
Follow the steps below to get the program working on your system locally.
- Clone the repo
git clone https://github.com/Pythonian/django_mastery.git
- Change into the directory of the cloned repo
cd django_mastery - Create a virtual environment and activate it
make venv source venv/bin/activate - Install the project requirements
make install
- Run your db migration and create an admin account
make migrations make admin
- Populate the database with fake data (optional step)
python manage.py create_candidates 500
- Start your development server
make runserver
You need to have Docker desktop up and running before you proceed
- Clone the repo
git clone https://github.com/Pythonian/django_mastery.git
- Change into the directory of the cloned repo
cd django_mastery - Build the docker image and spin up the container
docker-compose up -d --build
- Create your database migrations
docker-compose exec web python manage.py migrate --noinput docker-compose exec web python manage.py collectstatic --no-input --clear
- Create Superuser and populate database with Fake data
docker-compose exec web python manage.py createsuperuser docker-compose exec web python manage.py create_candidates 500
- Visit the URL via the browser
http://localhost:1337/
- To bring down the containers
docker-compose down -v