Performance: Serving media in development
MEDIUM IMPACT
This affects page load speed and responsiveness when loading images, videos, or other media files during development.
Configure MEDIA_URL and MEDIA_ROOT in settings.py and use django.views.static.serve in urls.py only during development to serve media files efficiently.
Using Django's default static file serving in development without configuring media URL and root properly, e.g., not using django.views.static.serve or not setting MEDIA_URL and MEDIA_ROOT correctly.| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Default Django dev server serving media without config | Minimal | 0 | High due to delayed media load | [X] Bad |
| Configured MEDIA_URL and MEDIA_ROOT with django.views.static.serve | Minimal | 0 | Lower paint delay due to faster media delivery | [OK] Good |