Home > Internet Programming > Quizzes > Django Fundamentals Test 2
Django Fundamentals Test 2
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 25% Most missed: “How do you exclude a specific field from a ModelForm?”
Django Fundamentals Test 2
Time left 00:00
25 Questions

1. What is the most easiest - fastest - and most stable deployment choice in most cases with Django?
2. What command do you use to alter the fields Django displays for a given model in the Django admin ListView?
3. The django.contrib.contenttypes application provides
4. What is the command to start Django's built-in development server?
5. What happens if MyObject.objects.get() is called with parameters that do not match an existing item in the database?
6. When customizing validation in a Form subclass named MyForm - how do you add an error message that is displayed as a form-wide error?
7. The Benevolent Dictators for Life of the Django Project are:
8. What is ModelForm used for?
9. After you make a new 'app' in your existing Django project - how do you get Django to notice it?
10. What is the Django shortcut method to more easily render an html response?
11. Assuming you have a Django model named 'User' - how do you define a foreign key field for this model in another model?
12. How would you create a ForeignKey from a model named Transaction - to a model named Product - with no reverse relation?
13. What is the definition of a good Django app?
14. What is the correct way to include django's admin urls? from django.contrib import admin') from django.conf.urls import patterns - include - url urlpatterns = patterns('' - ______________________ )
15. What is the command to start a new Django project called 'myproject'?
16. What does the Django command `manage.py validate` do?
17. What is the command to run Django's development server on port 8080 on IP address 12.34.56.78?
18. Given a model named 'User' that contains a field named 'email' - how do you perform a case-insensitive exact match for the email '[email protected]'?
19. What does a urls.py file do in Django?
20. You have created a Form class and wish to provide custom logic for validating the input in the 'foo' field. What would you name your custom validation method?
21. Where is pre_save signal in Django
22. By using django.contrib.humanize - you can use the following filter in your template to display the number 3 as three.
23. How would you perform a lookup on a model against a database aside from the default?
24. Assuming you've imported the proper Django model file - how do you add a 'User' model to the Django admin?
25. What is the correct syntax for including a class based view in a URLconf?