Complete the command to collect static files in Django for production.
python manage.py [1]The collectstatic command gathers all static files into the directory specified by STATIC_ROOT for production use.
Complete the setting to specify the directory where static files are collected.
STATIC_ROOT = '[1]'
STATIC_ROOT is the folder where collectstatic copies all static files for production.
Fix the error in this command to collect static files with no input prompt.
python manage.py collectstatic [1]The --noinput flag runs collectstatic without asking for confirmation, useful in automated deployments.
Fill both blanks to define static files URL and directory in Django settings.
STATIC_URL = '[1]' STATIC_ROOT = '[2]'
STATIC_URL is the URL prefix for static files, usually '/static/'. STATIC_ROOT is the folder where static files are collected, often 'staticfiles'.
Fill all three blanks to create a dictionary comprehension that collects file sizes for static files larger than 1000 bytes.
file_sizes = {file: os.path.getsize(file) for file in static_files if os.path.getsize(file) [1] [2] and file.endswith('[3]')}This comprehension filters static files larger than 1000 bytes and ending with '.css', then maps each file to its size.