示例#1
0
文件: users.py 项目: jams2/wagtail
def get_user_edit_form():
    form_setting = "WAGTAIL_USER_EDIT_FORM"
    if hasattr(settings, form_setting):
        return get_custom_form(form_setting)
    else:
        return UserEditForm
示例#2
0
def get_user_login_form():
    form_setting = 'WAGTAILADMIN_USER_LOGIN_FORM'
    if hasattr(settings, form_setting):
        return get_custom_form(form_setting)
    else:
        return LoginForm
示例#3
0
文件: users.py 项目: jams2/wagtail
def get_user_creation_form():
    form_setting = "WAGTAIL_USER_CREATION_FORM"
    if hasattr(settings, form_setting):
        return get_custom_form(form_setting)
    else:
        return UserCreationForm
示例#4
0
def get_user_login_form():
    form_setting = 'WAGTAILADMIN_USER_LOGIN_FORM'
    if hasattr(settings, form_setting):
        return get_custom_form(form_setting)
    else:
        return forms.LoginForm
示例#5
0
文件: account.py 项目: tnir/wagtail
def get_password_reset_form():
    form_setting = "WAGTAILADMIN_USER_PASSWORD_RESET_FORM"
    if hasattr(settings, form_setting):
        return get_custom_form(form_setting)
    else:
        return PasswordResetForm
示例#6
0
def get_user_edit_form():
    form_setting = 'WAGTAIL_USER_EDIT_FORM'
    if hasattr(settings, form_setting):
        return get_custom_form(form_setting)
    else:
        return UserEditForm
示例#7
0
def get_user_creation_form():
    form_setting = 'WAGTAIL_USER_CREATION_FORM'
    if hasattr(settings, form_setting):
        return get_custom_form(form_setting)
    else:
        return UserCreationForm