1. Which module in Django provides the administration interface?
a) django.admin
b) django.administration
c) django.admin_interface
d) django.contrib.admin
Answer: d) django.contrib.admin
2. Which command is used to create a superuser in Django admin?
a) python manage.py create_superuser
b) python manage.py createsuperuser
c) python manage.py make_superuser
d) python manage.py make_superadmin
Answer: b) python manage.py createsuperuser
3. Which file is commonly used to register models in Django admin?
a) admin.py
b) models.py
c) admin_models.py
d) admin_models.py
Answer: a) admin.py
4. Which decorator is commonly used to register models in Django admin?
a) @admin.register
b) @admin.site
c) @admin.model
d) @admin.register_model
Answer: a) @admin.register
5. Which method is used to specify the list of fields to display in the admin list view?
a) list_fields
b) fields_list
c) list_display
d) display_fields
Answer: c) list_display
6. Which method is used to specify the fields to be displayed in the detail view of a model in Django admin?
a) detail_fields
b) fields_detail
c) list_display
d) readonly_fields
Answer: d) readonly_fields
7. Which method is commonly used to filter records in the admin list view based on certain criteria?
a) list_filter
b) filter_list
c) filter_fields
d) admin_filter
Answer: a) list_filter
8. Which method is used to search records in the admin list view based on specific fields?
a) search_fields
b) find_fields
c) admin_search
d) search_list
Answer: a) search_fields
9. Which method is used to specify the ordering of records in the admin list view?
a) list_ordering
b) ordering_list
c) admin_order
d) ordering
Answer: d) ordering
10. Which method is commonly used to define actions that can be performed on selected records in Django admin?
a) admin_actions
b) model_actions
c) action_list
d) actions
Answer: d) actions
11. Which method is used to define the inline models in Django admin?
a) inline_models
b) admin_inline
c) inlines
d) admin_inlines
Answer: c) inlines
12. Which method is commonly used to customize the appearance and functionality of the Django admin site?
a) admin_customize
b) customize_admin
c) admin_options
d) site_options
Answer: b) customize_admin
Top Tutorials
Related Articles