Skip to content

Instantly share code, notes, and snippets.

@rpq
Last active December 12, 2015 07:59
Show Gist options
  • Save rpq/4741007 to your computer and use it in GitHub Desktop.
Save rpq/4741007 to your computer and use it in GitHub Desktop.
needed a quick and easy way to prefix all urls in a django application for development

###in settings.py:

URL_PREFIX = "^prefixstring/"

###in the urls.py:

if settings.URL_PREFIX:
  urlpatterns = patterns('',
    (settings.URL_PREFIX, include(urlpatterns),))

-inspired by info at: http://djangosnippets.org/snippets/2129/

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