`registration / login`而不是`accounts / login`

时间:2018-06-04 07:49:08

标签: django

在Django的1.11 django.conf.global_setting.py中,它配置了一个常量LOGIN_URL = '/accounts/login/'

##################
# AUTHENTICATION #
##################


LOGIN_URL = '/accounts/login/'

LOGIN_REDIRECT_URL = '/accounts/profile/'

它会重定向到'registration/login.html'

class LoginView(SuccessURLAllowedHostsMixin, FormView):
    """
    Displays the login form and handles the login action.
    """
    form_class = AuthenticationForm
    authentication_form = None
    redirect_field_name = REDIRECT_FIELD_NAME
    template_name = 'registration/login.html'
    redirect_authenticated_user = False
    extra_context = None

让我感到困惑的是,为什么它被命名为'registration/login.html'而不是accounts/login.html

0 个答案:

没有答案