Recall & Review
beginner
What is Gunicorn in the context of Django?
Gunicorn is a WSGI server that runs Django applications by handling HTTP requests and forwarding them to Django for processing.
Click to reveal answer
beginner
Why do we use Gunicorn instead of Django's built-in server in production?
Django's built-in server is for development only. Gunicorn is more efficient, handles multiple requests concurrently, and is designed for production use.
Click to reveal answer
beginner
How do you start a Django app with Gunicorn?
Run the command:
gunicorn myproject.wsgi:application where myproject.wsgi:application points to the WSGI application callable.Click to reveal answer
beginner
What does WSGI stand for and why is it important?
WSGI means Web Server Gateway Interface. It is a standard that allows web servers like Gunicorn to communicate with Python web apps like Django.
Click to reveal answer
intermediate
Name one key feature of Gunicorn that helps with handling multiple users.
Gunicorn uses worker processes to handle many requests at the same time, improving performance and reliability.
Click to reveal answer
What role does Gunicorn play in a Django application?
✗ Incorrect
Gunicorn acts as a WSGI server that manages HTTP requests and forwards them to Django.
Which command starts a Django app using Gunicorn?
✗ Incorrect
The command 'gunicorn myproject.wsgi:application' starts the Django app with Gunicorn as the WSGI server.
Why is Django's built-in server not recommended for production?
✗ Incorrect
Django's built-in server is for development and cannot efficiently handle multiple users or heavy traffic.
What does WSGI enable between Gunicorn and Django?
✗ Incorrect
WSGI provides a standard way for web servers like Gunicorn to communicate with Python web apps like Django.
How does Gunicorn improve handling many users at once?
✗ Incorrect
Gunicorn uses worker processes to handle multiple requests concurrently, improving performance.
Explain what Gunicorn does when running a Django application.
Think about how web servers and Django work together.
You got /4 concepts.
Describe why WSGI is important for Python web applications like Django.
Consider how different parts of a web app talk to each other.
You got /3 concepts.