Django Tutorial 1 – MyNotes App

Share the blog with your friends
  •  
  •  
  •  
  •  
  •  
  •  
  •  

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?

  1. What is Django?
  2. History of Django.
  3. Installation of Django.
  4. 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.

  1. Develop the ER diagram for our application.
  2. Setup Django project.
  3. Overview of file structure.
  4. Models development using the schema.
  5. Views development to handle the relevant URLs.
  6. Web server setup with Gunicorn.

Below are the information to store in the MyNotes application.

  1. note_id
  2. note_text
  3. added_by
  4. added_date
  5. status

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:

  1. added_by in mynotes referred from django_user table which is a one-to-many relation. One user can create any number of notes.
  2. added_by in tags referred from django_suer table which is again a one-to-many relation. Reason you already knew :).
  3. 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.

  •  
  •  
  •  
  •  
  •  
  •  
  •  

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *