Django round #1

As I’ve started using Django I came across some obstacles which I would like to point out.

Here’s my general thoughts about concepts and usage of particular functionalities.

MVC design pattern

The Model–View–Controller pattern is widely used in many implementations of various programming languages.

Model View Controller diagram

Components of the pattern:

Model – independent of the user interface, holds data and logic

View – representation of data to the user

Controller – controls the flow of information between the model and the view


But in Django they say it’s Model-View-Template:

Model – more or less the same like in MVC

Template (aka. View) – how data is presented

View (aka. Controller) – the framework itself, which data you see, not how you see


After each change of the Model ( you have to execute those commands:

  • python makemigrations

– packages up model changes into individual migration files (something like commits)


  • python sqlmigrate

– this additional step displays the SQL statements


  • python migrate

– applies those ‘commits’ to database


  • python showmigrations

– shows a list of project’s migrations and their status



to be continued…

Get Free Email Updates!

Signup now and receive an email once I publish new content.

I agree to have my personal information transfered to MailChimp ( more information )

I will never give away, trade or sell your email address. You can unsubscribe at any time.

Leave a Reply