0
我的Django项目的settings.py定义了几个URL变量,如LOGIN_URL
,LOGIN_REDIRECT_URL
等。我的urls.py定义了带有名称(“acct_login”,“acct_redirect”等)的URL, 。django - 参考settings.py中的url名称
有没有什么办法可以参考这些网址settings.py 的名字?例如LOGIN_URL = url(acct_login)
你试过[reverse()或reverse_lazy()](https://docs.djangoproject.com/en/dev/topics/http/urls/)吗? – Tadeck 2012-07-06 18:09:19