Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

Which of these is the correct way to serve static files in production?

  1. A Django serves them automatically with DEBUG False
  2. B Run collectstatic and serve them from a web server or CDN
  3. C Store them in the database
  4. D Inline them in templates
Answer

Run collectstatic and serve them from a web server or CDN

Django deliberately does not serve static files when DEBUG is False. collectstatic gathers them for the web server or a storage backend.

All Django MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as