Skip to content

Instantly share code, notes, and snippets.

@andrewebdev
Last active December 17, 2015 22:49
Show Gist options
  • Save andrewebdev/5685111 to your computer and use it in GitHub Desktop.
Save andrewebdev/5685111 to your computer and use it in GitHub Desktop.
Django: urls Extras
from ostinato.pages.registry import page_templates
page_templates.autodiscover()
if settings.DEBUG:
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += staticfiles_urlpatterns()
urlpatterns += patterns('', url(r'^', include('ostinato.pages.urls')),)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment