Skip to content

Commit

Permalink
Merge pull request #35 from outime/patch-1
Browse files Browse the repository at this point in the history
List of url() instead of using patterns()
  • Loading branch information
jsocol committed Dec 4, 2015
2 parents 49f72c1 + 8af1000 commit 029c4f1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions adminplus/sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@ def decorator(fn):
def get_urls(self):
"""Add our custom views to the admin urlconf."""
urls = super(AdminPlusMixin, self).get_urls()
from django.conf.urls import patterns, url
from django.conf.urls import url
for path, view, name, urlname, visible in self.custom_views:
urls = patterns(
'',
urls = [
url(r'^%s$' % path, self.admin_view(view), name=urlname),
) + urls
] + urls
return urls

def index(self, request, extra_context=None):
Expand Down

0 comments on commit 029c4f1

Please sign in to comment.