Django is a Model-View-Template (MVT) framework that allows you to build web applications. It is a high-level Python web framework that encourages rapid development and clean, pragmatic design. This means that developers will be either working on the models, the views, or the templates. The models are the database, the views are the logic and processing, and the templates are the frontend.
-
Read the documentation: Documentation
-
Ensure Python 3.11+ is installed on your machine. If not, download it from Python
-
Install Django using pip. Run the following command in your terminal. Create a virtual environment if you want to.
pip install -r requirements.txt
- Run the server.
python manage.py runserver
-
Open your browser and go to
http://localhost:8080/necysc_app
-
To access the admin panel, go to
http://localhost:8080/admin
and login with the following credentials:
username: admin
password: password
- To create a superuser, run the following command in your terminal.
python manage.py createsuperuser
- To make migrations (updating the database column headers if you change the models), run the following command in your terminal.
python manage.py makemigrations
python manage.py migrate
- An example codebase for another website I previously worked on: https://github.com/charlestang06/tutoring-app/tree/master
- Frontend: HTML, CSS (Bootstrap 5.0), JavaScript
- Backend: Django, MySQL
- Deployment: Python 3.11.5, WSGI
When creating a new feature, create a new view and a new template. Add the view to the urls.py
file in the necysc_app
folder.
- Setting up Model for Applicants (features)
- Setting up dummy data in SQLite DB
- Setting up the Applicant Registration Form
- Landing page
- Registration pages
- Login page
- Admin dashboard
Full feature list: Features
We assume you have the latest version of Python installed.
- Clone the repository
git clone
- Install the required packages
pip install django
- Make migrations
python manage.py makemigrations
python manage.py migrate
- Run the server.
python manage.py runserver 8080
- Open your browser and go to
http://localhost:8080/