Which of the following is the proper syntax to run the
migrate
command?Which of the following handles invalid or missing values from being stored in the database?
SET sql_mode=’DYNAMIC_TRANS_TABLES’
SET sql_mode=’STATIC_TRANS_TABLES’
SET sql_mode=’PASS_TRANS_TABLES’
SET sql_mode=’STRICT_TRANS_TABLES’
If we want to use another type of database instead of SQLite we must change the
DATABASES
configuration in the _________ file.py.models
Which of the following will register the
Menu
model inside of youradmin.py
file?admin.site(Menu)
site.admin(Menu)
admin.site.register(Menu)
site.admin.register(Menu)
Which file contains the
INSTALLED_APPS
for our application?py.models
Suppose we created a class which inherits from
ListCreateView
class, which two HTTP methods would be supported?POST
DELETE
PATCH
GET
True or False: When using DRF you can use the
DefaultRouter
class to wire up API URL’s instead of declaring routes in the app and including them in the project’sURLConf
.True
False
True or False: Django applications can be configured to handle multiple databases.
True
False
What is one advantage of using
ViewSets
in Django REST Framework?Views based on
ViewSets
are more concise and help to keep logic organized.Using one
ViewSet
we can handle all types of HTTP requests.It automatically enforces authentication.
It automatically serializes the queryset.
This is a special type of serializer which quickly creates a serializer class from Django model fields.
JsonSerializer
ModelSerializer
MenuSerializer