Google News
logo
Django - Quiz(MCQ)
A)
admin.py
B)
manage.py
C)
models.py
D)
settings.py

Correct Answer : Option (B) :   manage.py


Explanation : manage.py : This file is kind of your project local django-admin for interacting with your project via command line (start the development server, sync db...).

A)
wsgi.py
B)
urls.py
C)
settings.py
D)
__init__.py

Correct Answer : Option (A) :   wsgi.py


Explanation : wsgi.py is used if you need to deploy your project over WSGI.

A)
5
B)
4
C)
3
D)
2

Correct Answer : Option (D) :   2


Explanation : There are two kinds of HTTP requests, GET and POST.

A)
STATIC_URL
B)
STATIC_ROOT
C)
STATICFILES_DIRS
D)
All of the above

Correct Answer : Option (D) :   All of the above


Explanation : All of the above are variables are the settings for django.contib.staticfiles app.

A)
AJP
B)
SCGI
C)
mod_wsgi
D)
FastCGI

Correct Answer : Option (C) :   mod_wsgi

A)
Using get_absolute_url()
B)
Using reverse() in View Functions
C)
Using Template {{ url : }} in template
D)
None of the above

Correct Answer : Option (D) :   None of the above


Explanation : None of the above is not a valid method or approach to perform URL resolution.

A)
{{string|truncatewords:80}}
B)
{{string|truncate}}
C)
{{string|truncate:80}}
D)
{{string|truncatewords}}

Correct Answer : Option (A) :   {{string|truncatewords:80}}


Explanation : {{string|truncatewords:80}} : This filter will truncate the string, so you will see only the first 80 words.

A)
[{variable}]
B)
{{variable}}
C)
[[variable]]
D)
((variable))

Correct Answer : Option (B) :   {{variable}}


Explanation : Displaying Variables : A variable looks like this: {{variable}}

A)
To sync the database schema
B)
To configure settings for an app
C)
To configure settings for the Django project
D)
To set the date and time on the server

Correct Answer : Option (C) :   To configure settings for the Django project

A)
In-memory caching
B)
File sytem caching
C)
Both (A) and (B)
D)
None of the above

Correct Answer : Option (C) :   Both (A) and (B)