Skip to content

Instantly share code, notes, and snippets.

@PCreations
Created July 23, 2015 22:33
Show Gist options
  • Select an option

  • Save PCreations/01781e16f9409cddeeb6 to your computer and use it in GitHub Desktop.

Select an option

Save PCreations/01781e16f9409cddeeb6 to your computer and use it in GitHub Desktop.
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
]
if settings.SERVE_LOCAL_MEDIA:
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