[Fixed]-Get the value of variables passed in the url

1👍

The # is a mark for browser to display more friendly.

It’s not a part of the http request, so you can’t get the #manage_contacts through

target = request.GET.get('target', '')

For detail info:

what-is-the-symbol-in-the-url

Fragment_identifier

👤luoluo

0👍

You need to escape the #. The browser is treating this as a fragment for the current URL, and those don’t get sent to the backend.

Set the target URL instead to https://mysite/account/subs/%23manage_contacts.

Leave a comment