Skip to content

Instantly share code, notes, and snippets.

@vitorfs
Created November 9, 2018 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save vitorfs/0a889e491085f6044bc328ae300b3d19 to your computer and use it in GitHub Desktop.
Save vitorfs/0a889e491085f6044bc328ae300b3d19 to your computer and use it in GitHub Desktop.
Serving Django Media Files During Development
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)
@diptanu143
Copy link

Can you please advise - how should the URL patterns be handled for Production. Many thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment