Sail E0 Webinar

MCQs

Total Questions : 15 | Page 1 of 2 pages
Question 1. What are the advantages of using Django for web development?
  1.    It facilitates you to divide code modules into logical groups to make it flexible to change
  2.    It provides auto-generated web admin to make website administration easy
  3.    It provides pre-packaged API for common user tasks
  4.    All of the above
 Discuss Question
Answer: Option D. -> All of the above




Question 2. What is the most easiest, fastest, and most stable deployment choice in most cases with Django?
  1.    FastCGI
  2.    mod_wsgi
  3.    SCGI
  4.    AJP
 Discuss Question
Answer: Option B. -> mod_wsgi




Question 3. What Commands are used to create a project in Django?
  1.    Project
  2.    _init_.py
  3.    manage.py
  4.    All of the above mentioned
 Discuss Question
Answer: Option D. -> All of the above mentioned




Question 4. What is the Django command to view a database schema of an existing (or legacy) database?
  1.    manage.py legacydb
  2.    django-admin.py schemadump
  3.    manage.py inspect
  4.    manage.py inspectdb
 Discuss Question
Answer: Option D. -> manage.py inspectdb




Question 5. What happens if MyObject.objects.get() is called with parameters that do not match an existing item in the database?
  1.    The Http404 exception is raised
  2.    The DatabaseError exception is raised
  3.    The MyObject.DoesNotExist exception is raised
  4.    The object is created and returned
 Discuss Question
Answer: Option C. -> The MyObject.DoesNotExist exception is raised




Question 6. What is the Django command to start a new app named 'users' in an existing project?
  1.    manage.py "“newapp users
  2.    manage.py newapp users
  3.    manage.py "“startapp users
  4.    manage.py startapp users
 Discuss Question
Answer: Option D. -> manage.py startapp users




Question 7. What is the Django shortcut method to more easily render an html response?
  1.    render_to_html
  2.    render_to_response
  3.    response_render
  4.    render
 Discuss Question
Answer: Option B. -> render_to_response




Question 8. By using django.contrib.humanize, you can use the following filter in your template to display the number 3 as three.
  1.    apnumber
  2.    intcomma
  3.    intword
  4.    ordinal
 Discuss Question
Answer: Option A. -> apnumber




Question 9. How do you concatenate two QuerySets into one list?
  1.    result = list(query_set_1 | query_set_2)
  2.    from itertools import chain
  3.    from django.db.models import Q result = Q(query_set_1) | Q(query_set_1)
  4.    result = query_set_1 + query_set_2
 Discuss Question
Answer: Option B. -> from itertools import chain




Question 10. What are the features available in Django web framework?
  1.    Admin Interface (CRUD)
  2.    Templating
  3.    Form handling
  4.    All of the above
 Discuss Question
Answer: Option D. -> All of the above




Latest Videos

Latest Test Papers