Since you are here to learn Django, I assume you are aware the market demand and requirement on Python Django framework.
What is the plan?
- Practical approach to develop a web application from designing database to deploying the application in production web server.
- NGINX web server configuration using Gunicorn reverse proxy.
What is not the plan?
- What is Django?
- History of Django.
- Installation of Django.
- Discussion of all the methods in each modules.
Here I am going to explain the development of MyNotes application right from scratch to deployment in production. Let’s see, what are we going to achieve from this tutorial series. Here is our plan for this series.
- Develop the ER diagram for our application.
- Setup Django project.
- Overview of file structure.
- Models development using the schema.
- Views development to handle the relevant URLs.
- Web server setup with Gunicorn.
Below are the information to store in the MyNotes application.
As you guessed now, these are all going to be the database record columns for single note. We are going to use the default Django user management application which is called “Django Admin”.
I have provided the ERD(Entity Relation Diagram) below for the application.
ER Diagram explanation:
mynotes is the table where we store our note content. Unique tags will be stored in a table called tags from where we map the tags for each post in note_tags.
Foreign Keys and relations:
- added_by in mynotes referred from django_user table which is a one-to-many relation. One user can create any number of notes.
- added_by in tags referred from django_suer table which is again a one-to-many relation. Reason you already knew :).
- mynotes_note_id and tags_tag_id are the fields referred from mynotes and tags respectively.
So, We are ready with our design and the knowledge of what are we going to do with Django here. From next lesson, let’s start developing MyNotes application.