0

Not sure what's wrong here. I'm using the built-in comment form. The form tag is like this:

<form action="{% comment_form_target %}?next={% url post post.id %}" method="post">

The resulting HTML looks like this:

<form action="/comments/post/?next=/6/" method="post">

Where /6/ is my Post's post_detail address. However I still end up at this URL:

http://localhost:8000/comments/posted/?c=4

with a

Thank you for your comment. message

What is going on here? Thanks!

Jonas
  • 121,568
  • 97
  • 310
  • 388
rabbid
  • 5,465
  • 7
  • 26
  • 37

1 Answers1

4

next should be a POST param , not a GET param . try add following line into your form

 <input type="hidden" name="next" value="{% url post post.id %}" />

and leave the action of the form as "{% comment_form_target %}"

ftao
  • 441
  • 3
  • 5
  • Thanks! That worked. How odd. I copied that code from a tutorial. I guess it's incorrect after all. – rabbid Apr 15 '11 at 13:07