Created
November 9, 2018 20:13
-
-
Save vitorfs/0a889e491085f6044bc328ae300b3d19 to your computer and use it in GitHub Desktop.
Serving Django Media Files During Development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf import settings | |
from django.conf.urls.static import static | |
urlpatterns = [ | |
# Project url patterns... | |
] | |
if settings.DEBUG: | |
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you please advise - how should the URL patterns be handled for Production. Many thanks !