Files
don_confiao_backend/requirements.txt
aserrador 8818246870 feat: Add WhiteNoise for static files serving
- Add whitenoise==6.6.0 to requirements.txt
- Configure WhiteNoise middleware in base settings
- Add WhiteNoise STORAGES configuration for all environments
- Reorder CORS middleware to correct position (before CommonMiddleware)
- Enable automatic Gzip compression and cache busting
- Configure environment-specific settings:
  * Development: autorefresh enabled, use finders
  * Staging: 10min cache, autorefresh for testing
  * Production: 1 year cache, strict mode, optimized

Fixes issue with Django REST Framework static files returning 404
in staging/production environments (DEBUG=False).

WhiteNoise now serves all static files (CSS, JS, images) with:
- Automatic Gzip compression (~84% size reduction)
- Cache busting with content hashing
- Optimized cache headers
- No nginx required for static files
2026-05-10 20:32:30 -05:00

18 lines
466 B
Plaintext

Django==5.0.6
djangorestframework
django-cors-headers
djangorestframework-simplejwt
sabatron-tryton-rpc-client==7.4.0
# Database drivers
psycopg2-binary # PostgreSQL driver for production
# Production server
gunicorn # WSGI HTTP Server for production
# Environment variable management
python-decouple # Manage environment variables and settings
# Static files serving in production/staging
whitenoise==6.6.0 # Serve static files efficiently with compression