I should have mentioned explicitly that these are admin views, not standard user views. I catch the url patterns for them in myproject/ urls.py. Maybe this changes how reverse must be used?
-Tim On Feb 24, 6:15 pm, Timothy Kinney <timothyjkin...@gmail.com> wrote: > I have two views: > samurai_detail > add_item_to_samurai > > There is a button in samurai_detail that links to add_item_to_samurai. > The templates are the same except that add_item_to_samurai includes a > form to add an item. > > After posting the form, I want to redirect back to samurai_detail (the > page without the form that shows the items). > > As in the Django documentation, I thought I could do this with a > redirect, like so: > return redirect('samurai_detail') > > But this returns: Reverse for 'samurai_detail' with arguments '()' and > keyword arguments '{}' not found. > > This is a little bit cryptic. I think it says it can't find my view. > Both views are contained in myproject.myapp.admin_views.py > > Am I using reverse() incorrectly? How can I redirect to the > samurai_detail view? > > -Tim -- 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.