Django Web Framework - Module quiz: REST APIs

Django Web Framework - Module quiz: REST APIs

  1. What are the benefits of using pipenv? Choose all that apply.

    • It manages the dependencies

    • It creates a virtual environment for your project

    • It makes your project more secure

    • It makes your project run faster

  2. What is the default port number used by Django webserver?

    • 8000

    • 443

    • 8001

  3. What does the following command do?

    • python manage.py startapp

    • It creates a Django project

    • It creates a new Django app

    • It installs Django

  4. Authentication and authorization are the same thing.

    • True

    • False

  5. Which of the following HTTP status codes are used to indicate client-side and server-side errors? Choose all that apply.

    • 503 - Service Unavailable

    • 201 - Created

    • 301 - Moved Permanently

    • 404 Not Found

    • 403 – Forbidden

  6. What are the valid Accept headers for requesting XML content? Choose all that apply.

    • application/xml-content

    • code/xml

    • application/xml

    • text/xml

    • application/x-xml

  7. What can lead to data corruption in an API project? Choose all that apply.

    • Lack of caching

    • Lack of authorization

    • Lack of authentication

    • Lack of throttling

    • Lack of data validation and sanitization

  8. Which of the following statements are valid for Insomnia? Choose all that apply.

    • It’s a REST API Client

    • Insomnia can send different types of payloads

    • Insomnia has a mobile client

    • Insomnia has a command line tool

    • Insomnia is cross-platform

  9. Which of the following API clients/tools has both web and desktop versions?

    • Insomnia

    • Curl

    • Postman

  10. What is the purpose of renderer classes in DRF?

    • Quickly scaffold a CRUD API project

    • Convert serialized data to display as HTML, XML and JSON

    • Convert model instance to native Python data types