NoReverseMatch under mod_wsgi with custom admin.get_urls()
I'm using a custom admin.get_urls() method. It was working flawlessly
on the development server, but now under mod_wsgi I'm getting
NoReverseMatch errors almost anywhere I try to reverse the URL
patterns it adds (but not everywhere). Here's the method:
<staff_admin.py>
class CustomAdminSite(AdminSite):
def get_urls(self):
urls = super(CustomAdminSite, self).get_urls()
my_urls = patterns('',
url(r'^add-account/$',
self.admin_view(account_wizard),
name='account_wizard'),
url(r'^add-account/done/(?P<account_id>\d{1,6})/$',
self.admin_view(account_wizard_done),
name='account_wizard_done'),
)
return my_urls + urls
staff_admin = CustomAdminSite('staff_admin')
And in urls.py:
(r'^admin/', include(staff_admin.urls, app_name='staff_admin')),
Any idea what might be going wrong or how to fix it?
Thanks!
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home