Django doesn’t serve static files in production. Use the collectstatic command to gather static files into a single directory (STATIC_ROOT), which can be served by a web server.
Configuration
- Set
STATIC_ROOTinsettings.py: - Run the
collectstaticcommand: - Configure your web server (e.g., Nginx) to serve files from the
STATIC_ROOTdirectory.