You can use a hidden input in the for as a way of holding the link or id/ct of an object so you can determine where to redirect to. If the action is repetitive and you have a pretty good idea of where you to redirect to, I would think that is a simple solution.
This is what django's comment app does, allowing you to redirect users where you want after you submit a comment. Maybe peek in side of that to see how it was done? On Dec 4, 8:29 am, jwpeddle <jwped...@gmail.com> wrote: > I am currently trying to write a custom generic comment app and > growing increasingly frustrated with template tags. As far as I can > tell, template tags are the only mechanism provided that allow pieces > of logic to be shared across templates. Nonetheless, you cannot treat > them like a view, and cannot do things like redirect. Someone asking > about essentially the exact same thing two years ago > here:http://groups.google.ca/group/django-users/browse_thread/thread/a0603... > and Malcolm commented that this was unusual and that isn't what > template tags are for and the logic should go in a view. > > This isn't a satisfactory answer for me because the form logic in > question is identical regardless of the view/object. Why should anyone > be expected to duplicate form logic all over the project when it works > perfectly in a template tag without adding any repetitive code. The > only downside, as least in my case, is that I cannot redirect. > > Here's my basic tag:http://dpaste.com/128910/ > > I'd like to know why my thinking is flawed and where I can actually > put this logic without cluttering up every view that needs a comment > form. -- 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.