Created
May 19, 2014 05:24
-
-
Save Jwpe/631413ac7a4a4c645a94 to your computer and use it in GitHub Desktop.
Use a random URL path for the Django admin interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf import settings | |
from django.conf.urls.defaults import patterns, include, url | |
from django.contrib import admin | |
# Tells the admin to discover any 'admin.py' files in your apps. Not necessary in Django 1.7+ | |
admin.autodiscover() | |
urlpatterns = patterns('', | |
url(r'^{}/admin/'.format(settings.ADMIN_URL_PATH), include(admin.site.urls)), | |
... | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment