I started stepping through the django-registration (actually django) code. I couldn't find anything django-registration is doing during the login, so I think it isn't even responsible for this part.
Django wraps @login_required
view functions in _wrapped_view(request, *args, **kwargs)
functions (django.contrib.auth.decorators
) and performs an authentication test before executing the actual function. If found not logged in yet, it gets the current url as next
(path = request.build_absolute_uri()
) and starts the login. However, request.build_absolute_uri()
doesn't even return the hashtag url. Extracting the #-appended part of the url does generally not seem to be possible.