17th
Apr
Django MCQ

Django MCQ

  • Admin
  • 17th Apr, 2021
  • 933 Followers

Django MCQ Questions

Following are mostly asked Django MCQ test that are designed for professionals like you to crack you interviews. You can take this Django online test before appearing to you real interview. This Django quiz there are around 30+ multiple choice questions on Django with four options.

1) Does every candidate have to answer the same questions?

  • A. Yes
  • B. No

2) Django is quite ___.

  • A. unstable
  • B. stable
  • C. Both A and B
  • D. None of the above

3) How to create a project in Django?

  • A. urls.py
  • B. _init_.py
  • C. manage.py
  • D. settings.py
  • E. All of the above

4) Can I use Django offline?

  • A. Yes
  • B. No

5) What does {{ name }} this mean in Django Templates?

  • A. {{ name }} will be the output.
  • B. It will be displayed as name in HTML.
  • C. The name will be replaced with values of Python variable.
  • D. None of the above
Download Free : Django MCQ PDF

6) The architecture of Django consist of ______.

  • A. Views
  • B. Models
  • C. Templates
  • D. All of the above

7) The Django command to view a database schema of an existing (or legacy) database is ___.

  • A. manage.py inspect
  • B. manage.py legacydb
  • C. manage.py inspectdb
  • D. None of the above

8) Which of these variables are the settings for django.contib.staticfiles app?

  • A. STATIC_URL
  • B. STATIC_ROOT
  • C. STATICFILES_DIRS
  • D. All of the above

9) Which architectural pattern does django follow?

  • A. PHP
  • B. MVT
  • C. HTML
  • D. None of the above

10) Which of these is not a valid backend for caching in django?

  • A. django.core.cache.backends.sys.memory
  • B. django.core.cache.backends.db.DatabaseCache
  • C. django.core.cache.backends.locmem.LocMemCache
  • D. None of the above

11) What are Migrations in Django?

  • A. They are files saved in migrations directory.
  • B. They are created when you run makemigrations command.
  • C. Both A and B
  • D. None of the above

12) Every model inherits from django.db.models.Model.

  • A. Yes
  • B. No

13) In Django you just need to import django.core.mail as ___.

  • A. import django.core.mail
  • B. from django.core.mail import send_mail
  • C. Both A and B
  • D. None of the above

14) Django offers a set of classes for generic views in ____.

  • A. django.views.generic_set
  • B. django.views.generic.abc
  • C. django.views.generics
  • D. django.views.generic

15) Django is a high-level Python ___ that encourages rapid development and clean, pragmatic design.

  • A. language
  • B. plateform
  • C. web framework
  • D. All of the above

16) By using django.contrib.humanize, you can use the ____ filter in your template to display the number 3 as three.

  • A. intword
  • B. intcomma
  • C. intword
  • D. ordinal

17) ______ is the Django command to start a new app named ‘users’ in an existing project.

  • A. manage.py –startapp users
  • B. manage.py newapp users
  • C. manage.py –newapp users
  • D. manage.py startapp users

18) _____ are the features available in Django web framework.

  • A. Templating
  • B. Form handling
  • C. Admin Interface (CRUD)
  • D. All of the above

19) The most easiest, fastest, and most stable deployment choice in most cases with Django is _______.

  • A. AJP
  • B. mod_wsgi
  • C. FastCGI
  • D. SCGI

20) Advantages of Django are _____.

  • A. Ridiculously fast
  • B. Reassuringly secure
  • C. Exceedingly scalable
  • D. All of the above

21) The primary goal of Django is to ease the creation of complex, database-driven websites.

  • A. True
  • B. False

22) In Django ____ retrieve all the ‘User’ records from a given database.

  • A. User.object.all()
  • B. User.objects.all()
  • C. User.all_records()
  • D. All of the above

23) sqlmigrations commands are used to print the SQL query of the model.

  • A. True
  • B. False

24) sqlmigrations commands are used to print the SQL query of the model.

  • A. True
  • B. False

25) django.core.cache.backends.sys.memory is a valid backend for caching in Django.

  • A. True
  • B. False

26) _____ is not a logging framework message level.

  • A. Error
  • B. Critical
  • C. Debug
  • D. Important

27) Django requires a dictConfig in settings.py configuration for logging.

  • A. True
  • B. False

28) What is a Django App?

  • A. Django app is a python package with its own components.
  • B. Django app is an extended package with base package is Django.
  • C. Both A and B
  • D. None of the above

29) In Post.models.filter() you can pass multiple parameters in filter() to narrow your result/s.

  • A. True
  • B. False

30) Django is based on _____ framework.

  • A. MVC
  • B. MVVM
  • C. MVT (Model-View-Template)
  • D. None of the above

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.

Related MCQ/Quiz

01st
May
Unix MCQ
01st
Apr
Docker MCQ
01st
Jul
Tableau MCQ