In this article i am gone to share Django Web Framework by Meta | Module Quiz: Models Quiz Answers with you..
Enroll Link: Django Web Framework
Module Quiz: Models Quiz Answers
Question 1)
The sqlmigrate command generates the SQL query that will be executed when the migration is done.
- True
- False
Question 2)
Which of the following sentences about the primary key is correct? Select all that apply.
- The primary key attribute of the model should be unique for each instance.
- The primary key attribute of the model can be a string.
- The primary key attribute of the model should be an integer.
- The primary key attribute of the model should not be null.
Question 3)
To use MySQL with Django, what actions need to be taken?
- Set ‘USER’: ‘root’
- Set ‘PORT’: ‘8000’
- Install mysqlclient
- Set ‘ENGINE’: ‘django.db.backends.mysql’
Question 4)
Which of the following statements are about the ForeignKey type is correct? Select all that apply.
- A field of the ForeignKey type is used to establish a many-to-one relationship.
- A field of the ForeignKey type is used to establish a many-to-many relationship.
- A field of the ForeignKey type is used to establish a one-to-many relationship.
- A field of the ForeignKey type is used to establish a one-to-one relationship.
Question 5)
Which of the following built-in field types of a model stores numeric data? Select all that apply.
- IntegerField
- URLField
- CharField
- FloatField
Question 6)
The Django form is rendered in a tabular manner with a tag in the template. Identify the correct tag.
- {{ form.as_div }}
- {{ form.as_ul }}
- {{ form.as_table }}
- {{ form.as_p }}
Question 7)
Which of the following expressions extracts the data in the form submitted by the user?
- form.cleaned_data
- request.GET
- form.is_valid
- request.POST
Question 8)
Which of the following statements about a staff user is correct? Select all that apply.
- A staff user cannot modify the permissions enabled for a user.
- A staff user can create a group
- A staff user cannot create a new user
- A staff user can log in to the admin site
Question 9)
True or False. A superuser is allocated all permissions automatically to add, delete, and change the details of other users.
- True
- False
Question 10)
Which command option of the manage.py script is used to create an admin user for the Django admin site?
- runserver
- createuser
- createsuperuser
- shell