/django-tennis-club

My Tennis Club, powered by Django (v4.2.9), which is featured in W3school Django tutorial

Primary LanguagePython

My Tennis Club

My Tennis Club, powered by Django, which is featured in W3school Django tutorial


Preview

These are pages featured in the website:

Main page

main page


All Members page

all members page


Member Details page

Notice the yewllo-lined text, which indicates a slug that consists of the member's firstname and lastname. This can enhance search engine optimization

member's details page


Prerequisites

Before running the app, please make sure you have following software installed in your machine:


How to Run

  1. Create a virtual environment
python3 -m venv .venv
  1. Navigate to this directory, then activate the virtual environment
source .venv/bin/activate
  1. Install required packages
pip3 install -r requirements.txt
  1. Make a new file named .env, then copy .env.example and paste the content into it
cp .env.example .env

After that, fill .env with appropriate values

  1. Create a database (Make sure you have MySQL installed in your machine beforehand)
python3 mydb.py
  1. Apply database migration
python3 manage.py migrate
  1. Create a superuser of Django admin panel
python3 manage.py createsuperuser

You will then by asked several questions, such as username, email, and password of the superuser.

  1. Finally, run the server!
python3 manage.py runserver
  1. Voila! Visit http://localhost:8000 on your browser

To-do List

  • Fix styling of the all members page
  • Put available routes in the docs
  • Add a Dockerfile

Reference


Hello !