Recall & Review
beginner
What is the purpose of the
collectstatic command in Django?The
collectstatic command gathers all static files from each app and other locations into a single directory for easy serving in production.Click to reveal answer
beginner
Where does Django collect static files when you run
collectstatic?Django collects static files into the directory specified by the
STATIC_ROOT setting.Click to reveal answer
beginner
Why should you run
collectstatic before deploying your Django app to production?Because production servers usually serve static files separately, running
collectstatic prepares all static files in one place for efficient serving.Click to reveal answer
intermediate
What happens if you forget to run
collectstatic in production?Your site may not load CSS, JavaScript, or images properly because the static files won't be available in the expected location.
Click to reveal answer
intermediate
How can you customize which static files get collected by
collectstatic?You can customize by setting
STATICFILES_DIRS to include extra static file locations and by using --ignore option in the command to exclude files.Click to reveal answer
What Django setting defines where
collectstatic places collected files?✗ Incorrect
STATIC_ROOT is the folder where static files are collected for production.When should you run
collectstatic?✗ Incorrect
You run
collectstatic before deploying so static files are ready to serve.Which command runs the static files collection in Django?
✗ Incorrect
collectstatic is the command to gather static files.If static files are missing in production, what is a likely cause?
✗ Incorrect
Not running
collectstatic means static files are not gathered for production.Which setting controls additional static file folders to include during collection?
✗ Incorrect
STATICFILES_DIRS lists extra folders with static files to collect.Explain the role of the
collectstatic command in preparing a Django app for production.Think about how static files like CSS and images are handled in production.
You got /4 concepts.
Describe what could go wrong if you skip running
collectstatic before deploying your Django project.Consider what users see when styles or images don't load.
You got /4 concepts.