Introduction to Django – a Python framework for web applications
So far we have learned how to build web applications with the Flask framework.
Now we will meet Django – one of the best known and most powerful Python frameworks for web development.
What is Django?
Django is an open-source Python framework that makes it possible to develop modern web applications quickly.
It was created to make it easier for programmers to build complex projects.
- web applications
- administration systems
- API services
- large web portals
Why use Django?
Django offers many features that in other frameworks we have to implement ourselves.
- working with a database
- user authentication
- an administration panel
- a template system
- security mechanisms
Well-known sites that use Django
Django is used by many well-known companies:
- Mozilla
- Disqus
The difference between Flask and Django
Flask and Django are both Python web frameworks, but they follow different philosophies.
- Flask – simple and flexible
- Django – complete and structured
How Django works
Django uses an architecture called the MVT model.
- Model – working with the database
- View – the application logic
- Template – displaying HTML pages
Installing the Django framework
Django is installed with the Python package manager pip.
pip install django
If you have several Python versions installed, you can use the command:
pip3 install django
Checking the installation
We can check whether Django is installed with the following command:
django-admin --version
What we will learn in the next lessons
In the following lessons we will build a real Django web application.
- how to create a Django project
- how to make an application
- how to use a database
- how to build a user system
Related lessons
Frequently asked questions
What is Django?
Django is a Python framework for developing web applications.
Is Django hard to learn?
Django has more features than Flask, but it is well documented and widely used.
Is Django good for large projects?
Yes. Django is designed for scalable web applications.
Does Django use a database?
Yes. Django has a built-in system for working with databases.
