以下是来自 API 的重定向链接 我想呈现我的 urls.py
<块引用>re_path(r"^test-pay-redirect/",views.paytestredirect,name='test_pay_redirect'),
path("test-pay-redirect/",views.paytestredirect,name='test_pay_redirect'), 我两个都试 但它无法连接到这个网址
答案 0 :(得分:0)
请尝试删除 url 路由中的尾部斜杠!?
path("test-pay-redirect", views.paytestredirect, name='test_pay_redirect')
答案 1 :(得分:0)
我为您创建了一个简单的演示项目。 https://github.com/michaelhaar/Answer-for-Stackoverflow-66160632
运行 python manage.py runserver
命令并访问 http://localhost:8000/test-pay-redirect/?token=60257a578aedc20bd1a6892c&mode=popup&tap_id=chg_TS014820212148r1N41102850