#13344: Name collision for "next" template variable between contrib.comments and views.generic.list_detail --------------------------+------------------------------------------------- Reporter: erik | Owner: nobody Status: new | Milestone: Component: Contrib apps | Version: 1.2-beta Keywords: | Stage: Unreviewed Has_patch: 0 | --------------------------+------------------------------------------------- Both the comment system (in `post_comment` and it's accompagnying forms) and the generic views system (in `views.generic.list_detail`'s legacy template context stuff) use a template variabled named "next". The comment app's templates `approve.html`, `delete.html`, `flag.html` and `preview.html` render a hidden form field if `next` is not empty.
If you use for example the `list_detail` view with a template which renders a comment form for each list item, the comment form wrongly uses the `next`-value from the `list_details` view (the next page number). On posting the comment the user get's an 404 error, because the `post_comment` view now tries to redirect to a wrong URL containing the next page number. Maybe it's generally a bad idea to use very simple context variable names like `next` in prepackaged apps. -- Ticket URL: <http://code.djangoproject.com/ticket/13344> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.
