Master Python with 70+ Hands-on Projects and Get Job-ready - Learn Python
Placement-ready Courses: Enroll Now , Thank us Later!
After completing all the Django concepts from the tutorial series of Django framework, it’s time to test your knowledge.
Here, we are providing you with some multiple-choice questions of Django with answers.
Check other Django quizzes as well from the series of 4 Quizzes once you are done with this quiz.
So, let’s quickly start the Django quiz.
0 of 15 Questions completed
Questions:
Information You have already completed the quiz before. Hence you can not start it again.
You must sign in or sign up to start the quiz.
You must first complete the following:
Quiz complete. Results are being recorded.
0 of 15 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0 )
Earned Point(s): 0 of 0 , (0 ) 0 Essay(s) Pending (Possible Point(s): 0 )
Current Review / Skip Answered Correct Incorrect
Question 1 of 15
What happens when url.py file is edited while the development server is still running?
Question 2 of 15
Which setting contains the parameter of main-urls file?
Question 3 of 15
Django is based on which framework?
Question 4 of 15
What is the purpose of __init__.py in project directories?
Question 5 of 15
Which method is used instead of path() in urls.py to pass in regular expressions as routes?
Question 6 of 15
What happens if, from the given list, I searched for urlpatterns registration/ skipping the trailing/slash? urlpatterns = [ path(‘admin/’, admin.site.urls), path(‘registration/’, include(‘registrations.urls’)), path(”, include(‘home.urls’)), path(‘design’, include(‘design.urls’)), # DataFlair #Ajax # ——————————— path(‘ajax/’, include(‘post.urls’)), # ——————————— ]
Question 7 of 15
What is the use of os.path.dirname(__file__) in this method?
Question 8 of 15
What does happen when you execute this command in Terminal/ PowerShell?
Question 9 of 15
What is the value of DEBUG when website is online/ or deployed?
Question 10 of 15
What does {{ name }} this mean in Django Templates?
Question 11 of 15
What is this setting for? CACHES = { ’default’: { ’BACKEND’: ‘django.core.cache.backends.db.DatabaseCache’, ’LOCATION’: ‘dataflair_cache’, } }
Question 12 of 15
Check in-valid template tag.
Question 13 of 15
What will this template generate
#body-start
{% if (iterator) in list %} {{ iterator }} {% endif %}
#body-end
Question 14 of 15
What does {{ forloop.counter }} prints?
Question 15 of 15
This template {# #} is used for?
Hope you liked the set of questions in this Django Quiz.
If you have any queries and suggestions, post them in the comment box.
Did you like our efforts? If Yes, please give DataFlair 5 Stars on Google
hi
this is very nice blog to enhance django knowledge.
But i am facing some issues regarding a project can anybody help me in that case, waiting for reply from your team.
How can i help you !!
sdvf
fuck fuck
I think the correct answer in the question 5 is re_path() according with the django documentation
Awesome quizzes!!
What happens if, from the given list, I searched for urlpatterns registration/ skipping the trailing/slash?
Answer of this question is : Django will give a 404-error page.
As per my knowledge!
But plz correct me if i’m wrong!!!
No,It will first search for the registration URL , then go to the registration URL in another project app and find that it matches the same
#3 MVT or MVC are ‘framewok’ ? I read that this is architecture or design pattern.