Skip to content

Instantly share code, notes, and snippets.

@kjmczk
Last active May 23, 2019 05:28
Show Gist options
  • Save kjmczk/33bfe1e5fbd1bc4aa54d36de7526d7a9 to your computer and use it in GitHub Desktop.
Save kjmczk/33bfe1e5fbd1bc4aa54d36de7526d7a9 to your computer and use it in GitHub Desktop.
Django iSettings 5 - Blog
# myproject/urls.py
from django.conf import settings
from django.conf.urls.static import static
...
urlpatterns = [
...
]
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