Welcome to DjangoGym! After learning the fundamentals of Django - Views, URL Patterns, Admin Panel, Templates, Authentication, Django Signals, Class Based Views - I'm now putting it all together with a little project to create a gym web app. In this project I will use these skills I've learnt as well as explore new features such as many-to-many relationships, the use of the is_staff column in the User model, and much more. I have designed this app with a lot of features, buttons and routes, this is because I want to give myself the chance to practice and learn through a good amount of repetition of simply getting things done in Django. Below is the schema I have designed for this project.
- Backend: Python, Django, PostgreSQL
- Frontend: JavaScript, SortableJS, Bootstrap, CSS, HTML
- Deployment: Docker
Have a quick look at the pages on the website. These screenshots have been taken while logged in as a staff member, meaning all the buttons to add, edit and delete content are present.
Run the following command to clone the repo:
git clone https://github.com/shakey0/DjangoGym
cd DjangoGym
Create your virtual environment:
pipenv install
pipenv shell
Install dependencies:
pip install -r requirements.txt
Run the following commands to create the dev database: (If you haven't, install and setup PostgreSQL on your machine.)
createdb DjangoGymData
python manage.py migrate
Create a superuser with the username Andrew (remember the capital A):
python manage.py createsuperuser
# Username: Andrew
# Email address: [email protected]
# Password: <YOUR_CHOICE>
Seed the dev database:
python manage.py seed_db
Start the server:
python manage.py runserver
Go to http://localhost:8000/ and log in with the superuser you created! Enjoy!