DJANGO QUIZ DESCRIPTION Total Questions −30 00 Max Time − 15:00 Which of these variables are the settings for django.contib.staticfiles app? STATIC_URL STATIC_ROOT STATICFILES_DIRS All of the above What happens if MyObject.objects.get() is called with parameters that do not match an existing item in the database? The Http404 exception is raised The DatabaseError exception is raised The MyObject.DoesNotExist exception is raised The object is created and returned What is the Django command to start a new app named 'users' in an existing project? manage.py "“newapp users manage.py newapp users manage.py "“startapp users manage.py startapp users Which file is kind of your project local django-admin for interacting with your project via command line? settings.py admin.py models.py manage.py What are the features of Django web framework? Templating Form handling Admin Interface (CRUD) All of the above The architecture of Django consists of? Models Views Templates All of these What is the purpose of settings.py? To configure settings for the Django project To configure settings for an app To set the date and time on the server To sync the database schema Django was initially released in .................. July 2005 July 2006 June 2005 None of above Can I use Django offline? Yes No What does {{ name }} this mean in Django Templates? {{ name }} will be the output. It will be displayed as name in HTML. The name will be replaced with values of Python variable. None of the above django is written in which language? PHP Python Java Perl Which of these is not a valid backend for caching in django? django.core.cache.backends.sys.memory django.core.cache.backends.db.DatabaseCache django.core.cache.backends.locmem.LocMemCache None of the above In Django, views have to be created in the app views.py file. TRUE FALSE Can be true or false Can not say By using django.contrib.humanize, you can use the following filter in your template to display the number 3 as three. apnumber intcomma intword ordinal What is the most easiest, fastest, and most stable deployment choice in most cases with Django? FastCGI mod_wsgi SCGI AJP In Django how would you retrieve all the 'User' records from a given database? User.objects.all() Users.objects.all() User.all_records() User.object.all() View response can be the ? HTML contents 404 error XML document All of the above Which filter will truncate the string, so you will see only the first 80 words? {{string|truncatewords}} {{string|truncate:80}} {{string|truncate}} {{string|truncatewords:80}} What Commands are used to create a project in Django? Project _init_.py manage.py All of the above mentioned Render function takes ___________ parameters. 1 2 3 4 MVT Stands for? Model-View-Template Model-View-Table Map-View-Template Main-View-Template Which commands use to create a project in Django? $ django-admin createproject project_name $ django-admin startproject project_name $ django startproject project_name $ django createproject project_name Django supports the ___________ pattern. MVI MVP MVC MVZ _________ are modules in drupal. Core modules Contributed modules CustomModules All of the above What are the caching strategies in Django? File sytem caching In-memory caching Both A and B None _________ are the pieces of content that can be rendered anywhere on your Drupal website. Blocks Nodes Texonomy All of the above How do you concatenate two QuerySets into one list? result = list(query_set_1 | query_set_2) from itertools import chain result = list(chain(query_set_1, query_set_2)) from django.db.models import Q result = Q(query_set_1) | Q(query_set_1) result = query_set_1 + query_set_2 MVC pattern is based on _______ components. 2 3 4 5 Which of the following is a valid forloop attributes of Django Template System? forloop.reverse forloop.firstitem forloop.counter0 forloop.lastitem What are the features available in Django web framework? Admin Interface (CRUD) Templating Form handling All of the above Previous Next Total Question16 Wrong Answer13 Right Answer13