pythondjangodjango-templatesdjango-voting

After POST, weird redirect to iana.org follows


I'm using django-voting: https://github.com/brosner/django-voting/tree/master/voting And after my post, I'm redirected here: http://www.iana.org/domains/example/#c40

<form method="POST" action="/comments/{{ comment.id }}/up/vote/">
     {% csrf_token %}
     <button type="submit">Thumbs Up!</button>
</form>

The vote is created and I can see it in the admin.

No where in my application do I have this kind of redirect. Nor can I find this line of code in django-voting where it would have this redirect. Has this happened to anyone else, if so how'd you solve this?

I just want to be redirected the same page after the casted the vote. So I tried <input type="hidden" name="next" value="{{ event.get_absolute_url }}" /> thinking that it might override. But this doesn't seem to work. Suggestions?


Solution

  • I'm guessing that somewhere in your logic you redirect to "example.com". example.com is owned by the IANA and redirects to http://www.iana.org/domains/example/.

    Also, the "#c40" at the end of the url makes me think that Django is trying to redirect back to some page with a c40 anchor, possibly in order to have the thing you just voted on in view.