Django - use reverse url mapping in settings

后端 未结 2 1009
天涯浪人
天涯浪人 2021-01-31 02:25

A few of the options in the django settings file are urls, for example LOGIN_URL and LOGIN_REDIRECT_URL. Is it possible to avoid hardcoding these url

2条回答
  •  半阙折子戏
    2021-01-31 03:13

    In django development version reverse_lazy() becomes an option: https://docs.djangoproject.com/en/dev/ref/urlresolvers/#reverse-lazy

提交回复
热议问题