Menu mobile
Home
Programming
Python Tutorial
Java Tutorial
C Tutorial
C++ Tutorial
Web Technology
HTML
CSS
Java Script
PHP
React JS
Node JS
Assignment
MS Office
HTML
CSS
Bootstrap
Java Script
JQuery
AngularJs
Project
Blog
QUIZ ON : django - INTRODUCTION TO DJANGO
INTRODUCTION TO DJANGO
00:00:00
English
Hindi
Question No# :
01
out of 50
Which command is used to create a new Django project?
A.
startproject
B.
createproject
C.
newproject
D.
initproject
Question No# :
02
out of 50
What is Djangos django.contrib.staticfiles.storage.ManifestStaticFilesStorage used for?
A.
To define URL patterns for static files
B.
To store static files in a manifest file for efficient serving
C.
To manage user authentication for static files
D.
To handle file uploads in static files
Question No# :
03
out of 50
What is the purpose of Djangos django.contrib.messages.storage.session.SessionStorage?
A.
To define URL patterns for messages
B.
To handle user authentication through messages
C.
To manage messages and store them in the session
D.
To manage static files for messages
Question No# :
04
out of 50
What does the Django reverse_lazy() function provide that reverse() does not?
A.
It reverses URL patterns for class-based views
B.
It reverses URL patterns asynchronously
C.
It defers the URL reversal until all URL patterns are loaded
D.
There is no difference between reverse() and reverse_lazy()
Question No# :
05
out of 50
How can you use Djangos cache framework to store and retrieve cached data?
A.
By directly using the cache module in Python code
B.
By including a cache app in the Django project
C.
By using the cache template tag in HTML
D.
By setting the CACHE variable in the projects settings
Question No# :
06
out of 50
What is the purpose of Djangos get_object_or_404 function?
A.
To handle database migrations
B.
To retrieve an object from the database or return a 404 error
C.
To manage static files
D.
To define URL patterns
Question No# :
07
out of 50
Django is a _____________ Python web framework.
Django is a _____________ Python web framework.
A.
low-level
low-level
B.
mid-level
mid-level
C.
high-level
high-level
D.
None of the above
None of the above
Question No# :
08
out of 50
What is the purpose of Djangos SESSION_COOKIE_SECURE setting?
A.
It determines whether the session cookie is secure (only sent over HTTPS)
B.
It sets the expiration time for session cookies
C.
It configures the path for session cookies
D.
It defines the session engine to be used
Question No# :
09
out of 50
What does Djangos django.db.models.signals module provide?
A.
It defines URL patterns
B.
It handles user authentication
C.
It allows decoupled applications to get notified when certain actions occur elsewhere in the application
D.
It manages static files
Question No# :
10
out of 50
Django was introduced by ...................
Django was introduced by ...................
A.
Adrian Holovaty
Adrian Holovaty
B.
Bill Gates
Bill Gates
C.
Rasmus Lerdorf
Rasmus Lerdorf
D.
Tim Berners-Lee
Tim Berners-Lee
Question No# :
11
out of 50
How does Django handle database connections and queries?
A.
It uses raw SQL queries exclusively
B.
It uses an Object-Relational Mapping (ORM) system
C.
It relies on third-party libraries for database interaction
D.
It doesnt support databases
Question No# :
12
out of 50
What is Djangos django.contrib.sessions app used for?
A.
To define URL patterns for sessions
B.
To handle user authentication through sessions
C.
To create and manage server-side sessions
D.
Sessions are not supported in Django
Question No# :
13
out of 50
What does the Django @require_POST decorator do?
A.
It requires that a view can only be accessed with a POST request
B.
It requires user authentication for a view
C.
It enforces HTTPS for a view
D.
It requires that a view can only be accessed with a GET request
Question No# :
14
out of 50
How can you handle file uploads in Django forms?
A.
By using the FileField in the form
B.
By using the ImageField in the form
C.
By adding a custom file handling function in the view
D.
File uploads are not supported in Django forms
Question No# :
15
out of 50
What is the purpose of Djangos SELECT_RELATED and PREFETCH_RELATED queryset optimizations?
A.
They enable lazy loading of related objects
B.
They optimize database queries by selecting or prefetching related objects
C.
They handle user authentication
D.
They define URL patterns
Question No# :
16
out of 50
How can you use Djangos django.contrib.auth.views.login view with a custom template?
A.
By creating a custom template and specifying it in the urls.py file
B.
By using the {% extends %} template tag in the custom template
C.
By setting the LOGIN_TEMPLATE variable in the projects settings
D.
By modifying the login.html template in the auth app
Question No# :
17
out of 50
What is the purpose of Djangos django.contrib.redirects app?
A.
To define URL patterns for redirects
B.
To manage static files for redirects
C.
To handle user authentication through redirects
D.
To create and manage URL redirects in the admin interface
Question No# :
18
out of 50
Which architectural pattern does django follow?
Which architectural pattern does django follow?
A.
PHP
PHP
B.
MVT
MVT
C.
HTML
HTML
D.
None of the above
None of the above
Question No# :
19
out of 50
What is the purpose of Djangos django.contrib.admin.sites module?
A.
To manage admin users
B.
To define URL patterns for the admin interface
C.
To customize the behavior of the admin interface
D.
To store information about admin models
Question No# :
20
out of 50
How can you create a custom Django template filter?
A.
By subclassing the Filter class in the django.template module
B.
By defining a Python function and registering it using the @register.filter decorator
C.
By modifying the django.template.filters module
D.
By adding the filter directly in the template using the {% filter %} tag
Question No# :
21
out of 50
How can you set up a one-to-many relationship in Django models?
A.
Using OneToOneField
B.
Using ManyToManyField
C.
Using ForeignKey
D.
Using CharField
Question No# :
22
out of 50
Django was created in the fall of?
Django was created in the fall of?
A.
2001
2001
B.
2003
2003
C.
2005
2005
D.
2007
2007
Question No# :
23
out of 50
How does Django handle migrations for database schema changes?
A.
Manually update the database schema file
B.
Automatically generate and apply migration files
C.
Use raw SQL queries to update the database
D.
Migrations are not supported in Django
Question No# :
24
out of 50
What is the purpose of Djangos middleware named CommonMiddleware?
A.
It manages common database operations
B.
It handles user authentication
C.
It adds various HTTP headers to responses
D.
It defines common URL patterns
Question No# :
25
out of 50
What is Djangos csrf_exempt decorator used for?
A.
To exclude a view from CSRF protection
B.
To enforce CSRF protection on a view
C.
To define URL patterns for CSRF requests
D.
To handle user authentication
Question No# :
26
out of 50
In Django, what is the purpose of the models.py file in an app?
A.
It contains URL patterns
B.
It defines the database models
C.
It handles user authentication
D.
It defines the views for the app
Question No# :
27
out of 50
Which command is used to start the development server in Django?
A.
runserver
B.
startserver
C.
devserver
D.
initserver
Question No# :
28
out of 50
How can you customize the default Django admin site?
A.
By modifying the admin.py file in each app
B.
By subclassing and customizing the AdminSite class
C.
By using the @admin.site.register decorator
D.
Customization is not possible in the Django admin site
Question No# :
29
out of 50
Which Django command is used to apply migrations and update the database schema?
A.
migrate
B.
update
C.
syncdb
D.
applymigrations
Question No# :
30
out of 50
Django is a type of
Django is a type of
A.
Programming Language
Programming Language
B.
Software
Software
C.
Web framework
Web framework
D.
None of above
None of above
Question No# :
31
out of 50
What is Djangos django.contrib.flatpages app used for?
A.
To define URL patterns for flat pages
B.
To manage user authentication for flat pages
C.
To create and manage simple flat HTML pages in the admin interface
D.
Flat pages are not supported in Django
Question No# :
32
out of 50
What does the architecture of Django consist of?
What does the architecture of Django consist of?
A.
Views
Views
B.
Models
Models
C.
Templates
Templates
D.
All of the above
All of the above
Question No# :
33
out of 50
How can you include a custom Django template tag library in a template?
A.
By using the {% load %} template tag
B.
By importing the library directly in the Python code
C.
By defining a custom {% tag %} tag in the template
D.
Template tag libraries cannot be included in templates
Question No# :
34
out of 50
What are the Advantages of Django?
What are the Advantages of Django?
A.
It supports Multilingual
It supports Multilingual
B.
It supports the framework
It supports the framework
C.
Administration GUI
Administration GUI
D.
All of the above
All of the above
Question No# :
35
out of 50
How does Django support internationalization (i18n) and localization (l10n)?
A.
By automatically translating all text in templates
B.
By using the translate template tag
C.
By providing the gettext module for Python code
D.
All of the above
Question No# :
36
out of 50
In Django, what is the purpose of the HEAD request method?
A.
It retrieves data from the server
B.
It updates existing data on the server
C.
It checks whether a resource exists without retrieving the actual data
D.
It is not a valid HTTP request method
Question No# :
37
out of 50
How can you include comments in Django templates?
A.
Using the /* */ syntax
B.
By wrapping text in triple curly braces {{{ }}}
C.
Using the {# #} syntax
D.
Comments are not allowed in Django templates
Question No# :
38
out of 50
How can you handle static files in Django during development?
A.
By manually copying them to a static directory
B.
By using the staticfiles app
C.
By including them in the urls.py file
D.
Static files are not supported in Django
Question No# :
39
out of 50
Django was initially released in ..................
Django was initially released in ..................
A.
July 2005
July 2005
B.
July 2005
July 2005
C.
July 2005
July 2005
D.
None of above
None of above
Question No# :
40
out of 50
MVT Stands for?
MVT Stands for?
A.
Model-View-Template
Model-View-Template
B.
Model-View-Table
Model-View-Table
C.
Map-View-Template
Map-View-Template
D.
Main-View-Template
Main-View-Template
Question No# :
41
out of 50
What is Djangos django.contrib.messages app used for?
A.
To define URL patterns for messages
B.
To handle user authentication through messages
C.
To send messages between views and templates
D.
To manage static files for messages
Question No# :
42
out of 50
What is the purpose of Djangos SESSION_ENGINE setting?
A.
It defines the database engine for session storage
B.
It specifies the encryption algorithm for session data
C.
It configures the expiration time for sessions
D.
It determines the engine for template rendering
Question No# :
43
out of 50
What is the Django template language used for?
A.
To define database models
B.
To create URL patterns
C.
To define views
D.
To generate dynamic HTML content
Question No# :
44
out of 50
What are the features of Django web framework?
What are the features of Django web framework?
A.
Templating
Templating
B.
Form handling
Form handling
C.
Admin Interface (CRUD)
Admin Interface (CRUD)
D.
All of the above
All of the above
Question No# :
45
out of 50
What is the purpose of Djangos django.contrib.messages.middleware.MessageMiddleware?
A.
To define URL patterns for messages
B.
To handle user authentication through messages
C.
To manage messages and store them in the session
D.
To manage static files for messages
Question No# :
46
out of 50
What is Djangos django.contrib.syndication app used for?
A.
To define URL patterns for syndication feeds
B.
To handle user authentication through syndication feeds
C.
To manage static files for syndication feeds
D.
To create and manage syndication feeds in the admin interface
Question No# :
47
out of 50
What does the settings.py configuration DEBUG = False do in a Django project?
A.
Enables debugging information for the project
B.
Disables debugging information for the project
C.
Enables testing mode for the project
D.
Disables the entire Django project
Question No# :
48
out of 50
How can you create a custom Django template filter?
A.
By subclassing the Filter class in the django.template module
B.
By defining a Python function and registering it using the @register.filter decorator
C.
By modifying the django.template.filters module
D.
By adding the filter directly in the template using the {% filter %} tag
Question No# :
49
out of 50
What is the purpose of Djangos django.contrib.sites app?
A.
To define URL patterns for different sites
B.
To handle user authentication on different sites
C.
To manage multiple sites with a single Django installation
D.
To create separate Django projects for different sites
Question No# :
50
out of 50
How can you use Djangos django.contrib.auth.views.logout view function?
A.
logout(request)
B.
logout_user(request)
C.
auth_logout(request)
D.
All of the above
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test 2026
Best Computer Training Institute in Prayagraj (Allahabad)
Best Java Training Institute in Prayagraj (Allahabad)
Best Python Training Institute in Prayagraj (Allahabad)
O Level Online Test in Hindi
Best Website and Software Company in Allahabad