Sorry for the spam, but just wanted to note that I'd solved the
problem.  I was using the wrong method of namespacing.  The following
worked properly:

rev = reverse('staff_admin:account_wizard')

I'm wondering if there's a better way to demonstrate the usage in the
docs.

On Aug 19, 4:48 pm, ringemup <ringe...@gmail.com> wrote:
> And on third review, it only solves the issue in the templates.  In
> any view that is not an AdminSite method, this line throws a
> NoReverseMatch error:
>
> rev = reverse('account_wizard', current_app='staff_admin')
>
> On Aug 19, 4:39 pm, ringemup <ringe...@gmail.com> wrote:
>
> > Never mind, namespacing the reverse() calls and {% url %} tags seems
> > to have fixed things.
>
> > On Aug 19, 4:32 pm, ringemup <ringe...@gmail.com> wrote:
>
> > > 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-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to