Backend Development
Django
Subjective
Oct 03, 2025
Explain Django's static files handling and configuration.
Detailed Explanation
Django static files handling:\n\n**Settings:**\n• STATIC_URL - URL prefix for static files\n• STATIC_ROOT - Directory for collected static files\n• STATICFILES_DIRS - Additional directories to search\n• STATICFILES_FINDERS - Classes to find static files\n\n**Commands:**\n• python manage.py collectstatic - Collect all static files\n• python manage.py findstatic - Find specific static file\n\n**In templates:**\n• {% load static %}\n• {% static 'css/style.css' %}\n\n**Production:**\n• Use web server (Nginx/Apache) to serve static files\n• CDN integration for better performance
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts