Question Bank

3705 approved questions from the community

What function is used for simple URL pattern matching in Django?

MEDIUM
SINGLE CHOICE
30s
Django
by Mohamed

Django migrations can only be applied forward and cannot be reversed.

MEDIUM
TRUE FALSE
25s
Django
by Mohamed

Django migrations are stored as Python files that can be version controlled.

EASY
TRUE FALSE
25s
Django
by Mohamed

What is the difference between setting 'null=True' and 'blank=True' on a Django model field?

HARD
SINGLE CHOICE
40s
Django
by Mohamed

Django views must always return an HttpResponse object or one of its subclasses.

HARD
TRUE FALSE
30s
Django
by Mohamed

In Django URL patterns, the view parameter must always be a function reference.

MEDIUM
TRUE FALSE
25s
Django
by Mohamed

What is the difference between select_related() and prefetch_related() in Django?

MEDIUM
SINGLE CHOICE
40s
Django
by Mohamed

What is the purpose of the select_related() method in Django QuerySets?

MEDIUM
SINGLE CHOICE
35s
Django
by Mohamed

What does the create() method do in Django's ORM?

MEDIUM
SINGLE CHOICE
30s
Django
by Mohamed

What is a QuerySet in Django?

EASY
SINGLE CHOICE
30s
Django
by Mohamed

What does ORM stand for in Django?

EASY
SINGLE CHOICE
25s
Django
by Mohamed

URL patterns in Django can use regular expressions for advanced URL matching.

EASY
TRUE FALSE
25s
Django
by Mohamed

Once a QuerySet is evaluated, its results can still be modified by adding more filters.

MEDIUM
TRUE FALSE
25s
Django
by Mohamed

QuerySets in Django are evaluated immediately when they are created.

MEDIUM
TRUE FALSE
25s
Django
by Mohamed

Django's ORM provides protection against SQL injection attacks.

EASY
TRUE FALSE
25s
Django
by Mohamed

In Django's MTV pattern, what component is most similar to the Controller in traditional MVC?

MEDIUM
SINGLE CHOICE
35s
Django
by Mohamed

In Django's MTV architecture, what is the primary responsibility of the Model component?

MEDIUM
SINGLE CHOICE
30s
Django
by Mohamed

What is the role of the urls.py file in a Django project?

EASY
SINGLE CHOICE
30s
Django
by Mohamed

Django model fields can have descriptors like 'null' and 'blank' to define their behavior.

MEDIUM
TRUE FALSE
25s
Django
by Mohamed

Django models automatically generate database tables when migrations are run.

EASY
TRUE FALSE
25s
Django
by Mohamed
PreviousPage 74 of 186Next