[Fixed]-How do we tell where a django redirect comes from

1👍

✅

Usually, if you were redirected by @login_required decorator, the next query parameter is added to the path. For example:

127.0.0.1:8000/login/?next=/profile

So you can check if next is in the request.GET.

Leave a comment