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

Setting resolver_match in current request #33

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sspross
Copy link

@sspross sspross commented Apr 1, 2019

Hi @raiderrobert

We're using your multiurl library, thanks for that btw :) While using we ran into the problem of not having the right request.resolver_match later. For e.g. reverse the current request url in another language like url = reverse(request.resolver_match.view_name, kwargs=request.resolver_match.kwargs).

My provided fix solves this and I might be wrong but I think it is done similar to how django does this internally, see https://github.com/django/django/blob/bff5ccff7501d7bafb53d6110e311882e716bee5/django/core/handlers/base.py#L102

Let me know if you need more added to this very simple pull request :)

Best regards,
Silvan

@coveralls
Copy link

Coverage Status

Coverage remained the same at ?% when pulling ac592b3 on sspross:request-resolver-match into 6475b00 on raiderrobert:master.

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

Successfully merging this pull request may close these issues.

None yet

2 participants