且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

RuntimeError:调用Python对象时超出了最大递归深度

更新时间:2023-11-25 21:30:22

django测试客户端使用默认基本URL:

django test client uses default base url:

http://testserver/

将您的测试网址/accounts/register/设置为:

which makes your test url /accounts/register/ into:

http://testserver/accounts/register/

,因此您应该在django sites.site模型中添加"testserver"作为基本URL.最大递归深度超过了上限,因为django客户端未在sites.site中找到"testserver"作为域

so you should add 'testserver' in django sites.site model as a base url. maximum recursion depth exceed because django client did'nt find 'testserver' as a domain in sites.site