Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在views.py 中有一个名为“回调”的视图。如何获取该视图的域的绝对 url?
我尝试使用:
request.build_absolute_url(reverse('authorize'))
但这没有用。
我应该怎么办?
我相信build_absolute_uri不是build_absolute_url
build_absolute_uri
build_absolute_url
尝试这个:
request.get_host() + reverse('authorize')