Question Bank
3705 approved questions from the community
What function is used for simple URL pattern matching in Django?
Django migrations can only be applied forward and cannot be reversed.
Django migrations are stored as Python files that can be version controlled.
What is the difference between setting 'null=True' and 'blank=True' on a Django model field?
Django views must always return an HttpResponse object or one of its subclasses.
In Django URL patterns, the view parameter must always be a function reference.
What is the difference between select_related() and prefetch_related() in Django?
What is the purpose of the select_related() method in Django QuerySets?
What does the create() method do in Django's ORM?
What is a QuerySet in Django?
What does ORM stand for in Django?
URL patterns in Django can use regular expressions for advanced URL matching.
Once a QuerySet is evaluated, its results can still be modified by adding more filters.
QuerySets in Django are evaluated immediately when they are created.
Django's ORM provides protection against SQL injection attacks.
In Django's MTV pattern, what component is most similar to the Controller in traditional MVC?
In Django's MTV architecture, what is the primary responsibility of the Model component?
What is the role of the urls.py file in a Django project?
Django model fields can have descriptors like 'null' and 'blank' to define their behavior.
Django models automatically generate database tables when migrations are run.