Django Tutorial Part 1: Introduction to Django
Disclaimer: Your support helps keep JovialGuide running! Our content is reader-supported. This means if you click on some of our links, we may earn a commission.
Django is a popular Python web application framework. It stands out as the best Python web application framework because of its batteries-included nature. Django is built for developers, by developers, so, the core parts (like security, authentication, etc.) have been taken care of by the framework, so that developers can focus on developing the custom web applications they want.
In this complete beginners guide to Django part 1, we will introduce you to Django, the Django architectural design pattern, popular sites using Django and many more. This is a complete beginners guide to Django, so, you can move to the next series at the end of this Django tutorial.
Prerequisites to Learn Django
Before starting this complete beginners guide to Django, you do not need to have any knowledge of Django, as this complete beginners guide to Django aims at teaching you Django from beginner or non-programmer to advanced.
On the other hand, since Django is built on Python, the knowledge & concepts of programming, and Python is recommended.
What is Django?
Django is a full-stack open source high-level Python web application framework that emphasizes rapid (fast), clean, secure and maintainable web application development. It is written in Python, which means that your knowledge of Python can get you started with Django, and you can import and use any Python library directly into your Django projects. Django follows the MVT (Model View Template) architectural design pattern.
Django is built by experienced developers, for developers! It encourages reusability, rapid, less code and secure web application development. It follows the DRY – Do Not Repeat Yourself principle. When it comes to features, Django is often called the batteries-included framework, which means that it comes with everything you need to solve web application related problems.
As a batteries-included framework, Django comes with:
- Builtin authentication system
- Template layer
- Builtin administrator
Django has a standard ORM (Object Relational Mapper) for querying databases, just like SQL (Structured Query Language), and it has an administrative panel (similar to phpMyAdmin), which allows you perform CRUD (Create, Read, Update and Delete) operations without writing any query.
Django is a powerful Python web application framework that encourages rapid web development by emphasizing reusability and DRY principle. It comes with all of the common features a web application would need.
Here are the reasons to use Django:
- Encourages rapid (faster) development – Django’s goal is to allow developers create complex custom web applications that are supposed to take much time, really quickly. It emphasizes the DRY principle, which means Don’t Repeat Yourself! On the other-hand, Django comes with easy and quick ways to implement whatever feature web developers would want to.
- Builtin admin panel/site – There is an admin interface that is built into Django. It allows you manage data, by performing CRUD (Create, Read, Update and Delete) operations without writing any line of code. The Django administrator is similar to phpMyAdmin.
- Highly secure – The goal of Django is to allow developers write secure web applications. Django is engineered towards creating secure custom web applications. What this means is that Django manages the web security aspect of your web application, while you focus on creating the custom web application that you want.
- It is suitable for any web application project – On like other server-side frameworks and programming languages, Django was designed to be completely suitable for any custom web application project that a developer would want to build, starting from simple to complex projects, like: eCommerce/online stores, social media sites, medical/healthcare softwares, accounting softwares, etc.
- Written in Python – If you are a Python engineer, then you can easily get started with Django because it is written in Python programming language. Python is one of the most popular programming languages because of its extensiveness, availability of libraries & frameworks, and it easy-to-understand syntax compare to other programming languages. So, if you are learning Python or already a Python engineer, then you can get started with Django right-away!
- Designed as a batteries-included web framework – Django is built by experienced developers, for developers! It is loved for the reason that it’s designed as a batteries-included web framework, which means that it comes with the common features developers will need to create custom web applications. Features like: authentication, session, security, form, etc.
- Django is free and open source – Above all, Django is a free and open source software, which means that its source code is available for free, anyone can study and modify it. The open source nature of Django makes it have a very large community of developers backing it up!
So far, Django is considered the best Python framework for web development.
Django MVT Architectural Design Pattern
On like other web application frameworks and programming languages, Django follows MVT – Model View Template, which is an architectural design pattern for developing web applications. The Model View Template architectural design pattern is not as popular as MVC – Model View Controller.
MVT has three parts, which are:
- Model – The Model is responsible for, or acts as a layer for structuring, manipulating and handling data.
- Views – The Views is a layer that is responsible for handling or processing user requests and returning responses back to the user.
- Template – The Template layer is responsible for the entire User Interface (UI) of your web application. It handles all the static part of the web page. The Template is basically the HTML!
What can Django Do?
Django can be used to build any type of website, ranging from simple to complex ones. It is suitable for developing high-performance web applications.
Here are some websites you can build with Django:
- Social media site
- Learning Management System
- Medical and healthcare softwares
- Appointment Management System
- Bus reservation system
- eCommerce/online store
- eLearning/course sites
Django can also be used on all industries. Some examples are:
Popular Sites Using Django
Because of the scalable, robust and powerful nature of Django, it is the first choice for high profile companies and sites.
Here are some Django website examples – popular sites and companies that use Django:
- Mozilla – a popular web browser that initially started with PHP before switching to Python Django. Now it is more powerful than before.
- Instagram – when it comes to social media sites, Instagram is one of them! Instagram deals with a large media data and user interaction. It uses Django as its choice of web application framework.
- Disqus – is an American blog comment hosting service. Its backend is built with Django.
- NASA – National Aeronautics and Space, NASA, is a U.S. government agency that is responsible for science and technology related to air and space.
- Pinterest – is a visual discovery engine for finding ideas like: home, style inspiration, etc.
- Spotify – a large media library of songs that allows you listen to music for free, or on a subscription base. It is powered by machine learning (Python) and Django, so Spotify gives you a full Python experience.
Where to Learn Django
If you are an absolute beginner to Django, then we recommend you follow our complete beginners guide to Django from part 1 (this is part 1), which will lay the right foundation for Django. Upon completion of our complete beginners guide to Django, see other of our Django tutorials to master Django up to advanced level. However, if you are not completely new to Django, or would like to advance your knowledge of Django, then head over to our Django tutorials section to get started.
In the next complete beginners guide to Django, we will show you:
We hope this complete beginners guide to Django – introduction to Django (part 1), introduced you well to Django and its concepts.
See other of our Django tutorials for more.