PythonTutorials.net
Toggle Menu
Home
Online Python Compiler
Tutorials
Django
Flask
Scikit-Learn
NumPy
NLTK
Pillow
Blog
All Posts
Django Fundamentals
Test your knowledge of Django’s core concepts including models,views,and templates.
1. What is Django's official tagline?
The Web framework for perfectionists with deadlines
Build fast, run fast
Simple, flexible, powerful
Write once, run anywhere
2. Which of the following are valid Django model field types?
CharField
IntegerField
BooleanField
ColorField
3. Django follows the MVT (Model-View-Template) architecture.
True
False
4. What command initializes a new Django project? (format: command)
5. Which file defines the main URL routing for a Django project?
urls.py
views.py
models.py
settings.py
6. Which of the following are Django template tags?
{% if %}
{% for %}
{% include %}
{% import %}
7. Django's default database is PostgreSQL.
True
False
8. Name Django's built-in interface for managing application data (one word).
9. What is the primary role of Django's ORM?
Handle database interactions
Render HTML templates
Authenticate users
Route URLs to views
10. Which middleware classes are enabled by default in Django?
AuthenticationMiddleware
CsrfViewMiddleware
SessionMiddleware
CacheMiddleware
11. Django forms require manual CSRF protection setup.
True
False
12. What decorator restricts view access to logged-in users? (format: @decorator)
13. Which file stores project-wide settings like INSTALLED_APPS?
settings.py
config.py
project.py
setup.py
14. Which ORM methods retrieve multiple objects from the database?
Model.objects.all()
Model.objects.filter()
Model.objects.get()
Model.objects.first()
15. Django templates support inheritance with the {% extends %} tag.
True
False
16. What is the default file extension for Django templates?
17. Which class-based view handles form submission for creating objects?
CreateView
FormView
ListView
DetailView
18. Which are built-in Django authentication backends?
ModelBackend
RemoteUserBackend
EmailBackend
SocialAuthBackend
19. Django automatically serves static files in production.
True
False
20. What command applies pending migrations to the database?
Reset
Answered 0 of 0 — 0 correct