Opened 6 years ago
Closed 6 years ago
#31114 closed Bug (fixed)
request.build_absolute_uri does not support reverse_lazy
| Reported by: | Dmitrij Strelnikov | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (URLs) | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
redirect_uri = 'google_callback'
print('reverse')
print(request.build_absolute_uri(reverse(self.redirect_uri)))
print('lazy')
print(request.build_absolute_uri(reverse_lazy(self.redirect_uri)))
reverse
SplitResult(scheme='', netloc='', path='/google/callback/', query='', fragment='')
lazy
File "/Users/.pyenv/versions/3.8.1/lib/python3.8/urllib/parse.py", line 108, in <genexpr>
return tuple(x.decode(encoding, errors) if x else '' for x in args)
AttributeError: '__proxy__' object has no attribute 'decode'
exception is raised by from urllib.parse import urlsplit
I think it's the same issue as https://code.djangoproject.com/ticket/18776
Change History (3)
comment:1 by , 6 years ago
| Easy pickings: | set |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
| Type: | Uncategorized → Bug |
| Version: | 3.0 → master |
comment:2 by , 6 years ago
| Has patch: | set |
|---|
Note:
See TracTickets
for help on using tickets.
https://github.com/django/django/pull/12246