Recall & Review
beginner
What is the purpose of Django's
runserver command?The
runserver command starts a lightweight development server that lets you see your Django app in action on your local machine. It helps you test and develop your app without needing a full web server setup.Click to reveal answer
beginner
How do you start the Django development server on the default port?
You run the command
python manage.py runserver in your project folder. This starts the server on http://127.0.0.1:8000/ by default.Click to reveal answer
beginner
Can you change the port number when running Django's development server? How?
Yes, you can specify a different port by adding it after the command, like
python manage.py runserver 8080. This starts the server on port 8080 instead of the default 8000.Click to reveal answer
intermediate
Why should you not use Django's development server in a production environment?
The development server is simple and not designed for security or performance. It can crash easily and is not safe for real users. For production, use a proper web server like Gunicorn or Apache.
Click to reveal answer
beginner
What happens when you save changes to your Django code while the development server is running?
The development server automatically reloads your app to show the changes immediately. This makes development faster because you don't have to stop and start the server manually.
Click to reveal answer
What command starts the Django development server?
✗ Incorrect
The correct command is
python manage.py runserver to start the development server.By default, on which port does Django's development server run?
✗ Incorrect
Django's development server runs on port 8000 by default.
Which of these is NOT a reason to avoid using Django's development server in production?
✗ Incorrect
Automatic reload is a helpful feature for development, not a reason to avoid production use.
How can you specify a custom port when running the Django development server?
✗ Incorrect
You specify the port by adding it directly after the command, like
python manage.py runserver 9000.What URL do you visit in your browser to see your Django app running on the default development server?
✗ Incorrect
The default URL is
http://127.0.0.1:8000 which points to your local machine on port 8000.Explain how to start the Django development server and how to change its port.
Think about the command line steps and default settings.
You got /3 concepts.
Why is Django's development server not suitable for production use?
Consider what a production server needs that the development server lacks.
You got /4 concepts.