Module Quiz: The Full Stack Using Django

Module Quiz: The Full Stack Using Django

  1. When Django is set up to use MySQL as its database, it will use which port to connect to MySQL by default?

    • 8000

    • 3306

    • 8080

    • 443

  2. A collection of objects obtained from a Django model using function calls such as Model.objects.all() will be a _____.

    • Tuple

    • QuerySet

    • JSON object

    • List

  3. What command is used to create a migration in Django?

    • manage.py makemigrations

    • manage.py migrate

    • django-admin makemigrations

    • django-admin migrate

  4. _________ is the class containing Django implementation for unit tests in Python.

    • TestCase

    • TestUnit

    • UnitTest

    • TestCaseUnit

  5. This tool allows a developer to quickly build APIs in Django and provides other benefits, like a built-in API viewer and serializer.

    • DRF

    • MVT

    • REST

    • JSON

  6. Model relationships can be which of the following types? Select all that apply.

    • One-to-one

    • One-to-many

    • One-to-none

    • Many-to-many

  7. What function can be used in Django to help normalize data coming back from an API call?

    • cleaned_data

    • normalize_data

    • get_clean_data

    • data_clean

  8. When building a model, each attribute corresponds to what?

    • A database field

    • A dictionary key

    • A view

    • A form field

  9. Select the correct implementation of the render() function inside a view for rendering a context dictionary in a template added to home.html.

    • return render(request, context, 'home.html')

    • return render(request, ‘home.html', context)

    • return render( ‘home.html’, request, context)

    • return render(context, request, 'home.html')

  10. When authenticated calls need to be made, what is used to pass authentication information?

    • Bearer token

    • JSON

    • Payload

    • Django model