Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

?next= does not work #11

Open
darkpixel opened this issue Mar 10, 2014 · 1 comment
Open

?next= does not work #11

darkpixel opened this issue Mar 10, 2014 · 1 comment

Comments

@darkpixel
Copy link

It appears from looking at the code that I should be able to do something like:

<A HREF="{% url 'comments-flag' comment.pk %}?next=/someurl">Flag comment</A>

But when I'm on the "Really flag this comment?" page, the hidden 'next' form entry isn't populated.

If (instead of linking) I do a form that POSTs to {% url 'comments-flag' comment.pk %} with my own 'next' field, it does work.

@philgyford
Copy link

I realise this is 7 years later but I've just been looking at something related.

The flag() view accepts a next URL parameter but doesn't do anything with request.GET data. So if the POST form has a next field, that's used. But if the GET request's URL has ?next=/someurl that gets ignored.

The same is true of the other views in views/moderation.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants