-
Notifications
You must be signed in to change notification settings - Fork 700
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Travis tests: Django 1.10 compatiblity fix for url patterns
- Loading branch information
Showing
1 changed file
with
12 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
from django.conf.urls import patterns, include, url | ||
from django.conf.urls import include, url | ||
from django.contrib import admin | ||
|
||
admin.autodiscover() | ||
|
||
urlpatterns = patterns('', | ||
# Examples for custom menu | ||
url(r'^admin/', include(admin.site.urls)), | ||
) | ||
try: | ||
from django.conf.urls import patterns | ||
urlpatterns = patterns( | ||
'', | ||
# Examples for custom menu | ||
url(r'^admin/', include(admin.site.urls)), | ||
) | ||
except ImportError: # Django 1.10+ | ||
urlpatterns = [ | ||
url(r'^admin/', include(admin.site.urls)), | ||
] |