Improve this article..
What is the MVT architecture?
Django comes with an ORM for mapping your database onto classes, known as models.
For programmers who Get Stuff Done, traditional MVC and MVT architectures broadly amount to the same thing. Django's MVT architecture can be briefly described as follows:
- Models - The Data layer that contains how to access, validate, which behaviors it has, and the relationships between the data.
- Templates - The presentation layer that contains decisions on how something should be displayed on the web page.
- Views - The Business logic layer that contains logic that accesses the model and redirects to and populates the appropriate template
How does Django compare against other web frameworks? What are the different backend databases supported?
Popular Databases supported by Django include PostgreSQL, MySQL, SQLite, Oracle SQL, NoSQL, SAP SQL Anywhere, IBM DB2, Microsoft SQL Server, Firebird, and ODBC.
What are some popular large-scale websites using Django? What are the advantages of Django?
Advantages include the following:
- Python is easy to learn, quick and powerful. It also works on any platform and is also open source.
- Django has an active community that contribute to many great libraries, several pre-made apps and are generally very helpful.
- You can get started quickly and it is full stack.
- Promtoes modularity of code and code reuse.
Is Django recommended for a Python beginner?
This seems to be a topic of debate, while some claim the official documentation and tutorials are some of the best anywhere in software development others seem to be of the opinion that there are easier frameworks to understand in python.
How challenging is it to deploy a Django-based web app?
It is difficult to deploy a Django-based app if you work from scratch but there are many resources available to help you. Check for Mozilla Developer link in further reading section.
You can also use AWS Elastic Beanstalk, Django docker containers etc which are very easy to use.
Can you share some performance results of Django?
Compared to other python framework Django performance is not that great but not that bad too.
Can Django be used for mobile apps, REST APIs or microservices?
Django framework can not be used for deveoping native mobile apps. But backend of app on server can be some and both can be linked using REST APIs.
For quick start check Further Reading section.
Is Django suited for real-time services and asynchronous apps?
Django was not built to handle asynchronous I/O from the ground up like Node.js and newer frameworks that run on the event driven model could tackle the problem better. But asynchronous task queues can be made available to django via celery or gevent.
What is the best way to test a Django-based web app?
Testing a website is a complex task, because it is made of several layers of logic from HTTP-level request handling and queries models to form validation, processing and template rendering.
Django provides a test framework with a small hierarchy of classes that build on the Python standard unittest library and helpful in both unit and integration tests.
Some of the Django Test Classes include SimpleTestCase, TransactionTestCase, TestCase and LiveServerTestCase.
For complete server/website third-party testing platforms like Selenium, Ranorex Studio, Sahi, SOAtest, etc. can also be used.
Added Admin Support
API stability, decoupled admin, unicode
Added Multiple db connections, CSRF, model validation
Added Python 3 Support, configurable user model
Removed Python 2 support, first Python 3-only release
- Deploying Django to production
- Testing a Django web application
- Testing in Django