You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The to argument should correspond to the first positional parameter of the Django shortcut's resolve_url function. Our implementation may break when to is something else than a string.
Specifically, when get_absolute_url() returns a URL containing a protocol and a hostname or IP address then there will be two base_urls in the resulting URL string.
Pylint (correctly) complains about to being a keyword-argument used as a positional argument, and to being a bad name. In Django's resolve_url implementation, to is a positional argument, but we want it to be optional (not necessarily a keyword-argument, strictly speaking), e.g.
# returns the value of `base_url`context.get_url()
As mentioned in #140 (review), odds are that we have a problem with the implementation of environment.get_url().
to
argument should correspond to the first positional parameter of the Django shortcut'sresolve_url
function. Our implementation may break whento
is something else than a string.get_absolute_url()
returns a URL containing a protocol and a hostname or IP address then there will be two base_urls in the resulting URL string.Pylint (correctly) complains about
to
being a keyword-argument used as a positional argument, andto
being a bad name. In Django's resolve_url implementation,to
is a positional argument, but we want it to be optional (not necessarily a keyword-argument, strictly speaking), e.g.When
to
Is a Model or a View NameThe problem may occur when the argument passed to
get_url
is not a simple URL path string.In this case, Django's
resolve_url
shortcut might return a URL string that has a URL protocol and hostname already included!Other Issues
Also, it's unclear whether
**kwargs
also pass theto
keyword argument toresolve_url
in our implementation, or just the remainder.What to Do
to
is not included in**kwargs
.environment.get_url()
.The text was updated successfully, but these errors were encountered: