X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/2f9cb34a07fcd98effda2fa900e48c31813f14c8..8bed012a092f7846e2744a38c6063708a62724a0:/apps/forms_builder/forms/admin.py?ds=sidebyside diff --git a/apps/forms_builder/forms/admin.py b/apps/forms_builder/forms/admin.py index 61a6d0b9..bef87fe5 100644 --- a/apps/forms_builder/forms/admin.py +++ b/apps/forms_builder/forms/admin.py @@ -7,7 +7,7 @@ from os.path import join from datetime import datetime from io import BytesIO, StringIO -from django.conf.urls import patterns, url +from django.conf.urls import url from django.contrib import admin from django.core.files.storage import FileSystemStorage from django.core.urlresolvers import reverse @@ -84,20 +84,20 @@ class FormAdmin(admin.ModelAdmin): Add the entries view to urls. """ urls = super(FormAdmin, self).get_urls() - extra_urls = patterns("", - url("^(?P\d+)/entries/$", + extra_urls = [ + url(r"^(?P\d+)/entries/$", self.admin_site.admin_view(self.entries_view), name="form_entries"), - url("^(?P\d+)/entries/show/$", + url(r"^(?P\d+)/entries/show/$", self.admin_site.admin_view(self.entries_view), {"show": True}, name="form_entries_show"), - url("^(?P\d+)/entries/export/$", + url(r"^(?P\d+)/entries/export/$", self.admin_site.admin_view(self.entries_view), {"export": True}, name="form_entries_export"), - url("^file/(?P\d+)/$", + url(r"^file/(?P\d+)/$", self.admin_site.admin_view(self.file_view), name="form_file"), - ) + ] return extra_urls + urls def entries_view(self, request, form_id, show=False, export=False,