Question Bank

3705 approved questions from the community

The Django admin interface can display related objects through foreign key relationships in the list view.

HARD
TRUE FALSE
30s
Django
by Mohamed

The Django admin interface is suitable for production client-facing applications.

MEDIUM
TRUE FALSE
30s
Django
by Mohamed

What does on_delete=models.CASCADE mean in a ForeignKey relationship?

MEDIUM
SINGLE CHOICE
35s
Django
by Mohamed

What is the main difference between ForeignKey and ManyToManyField?

MEDIUM
SINGLE CHOICE
35s
Django
by Mohamed

What is a ManyToManyField in Django?

EASY
SINGLE CHOICE
30s
Django
by Mohamed

What is a ForeignKey in Django models?

EASY
SINGLE CHOICE
30s
Django
by Mohamed

Models must be registered in admin.py to appear in the Django admin interface.

EASY
TRUE FALSE
25s
Django
by Mohamed

An abstract base class in Django creates its own database table.

MEDIUM
TRUE FALSE
25s
Django
by Mohamed

ManyToManyField automatically creates an intermediary join table in the database.

MEDIUM
TRUE FALSE
25s
Django
by Mohamed

A ForeignKey field requires an on_delete parameter to specify behavior when the referenced object is deleted.

MEDIUM
TRUE FALSE
30s
Django
by Mohamed

What is the purpose of URL namespacing in Django?

HARD
SINGLE CHOICE
40s
Django
by Mohamed

What does the render() function do in Django views?

MEDIUM
SINGLE CHOICE
30s
Django
by Mohamed

What is the purpose of the include() function in Django URLs?

MEDIUM
SINGLE CHOICE
35s
Django
by Mohamed

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

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
PreviousPage 73 of 186Next