當前位置: 首頁>>代碼示例>>Python>>正文


Python views.password_reset方法代碼示例

本文整理匯總了Python中django.contrib.auth.views.password_reset方法的典型用法代碼示例。如果您正苦於以下問題:Python views.password_reset方法的具體用法?Python views.password_reset怎麽用?Python views.password_reset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在django.contrib.auth.views的用法示例。


在下文中一共展示了views.password_reset方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: forgot_passwd

# 需要導入模塊: from django.contrib.auth import views [as 別名]
# 或者: from django.contrib.auth.views import password_reset [as 別名]
def forgot_passwd(request):
    """
    User password reset page.
    """
    dc_settings = request.dc.settings

    return password_reset(
        request,
        template_name='gui/accounts/forgot.html',
        email_template_name='gui/accounts/forgot_email.txt',
        subject_template_name='gui/accounts/forgot_subject.txt',
        password_reset_form=partial(ForgotForm, request),
        post_reset_redirect=reverse('forgot_done'),
        from_email=dc_settings.DEFAULT_FROM_EMAIL,
        current_app='gui',
        extra_context={
            'e_site_name': dc_settings.SITE_NAME,
            'e_site_link': dc_settings.SITE_LINK,
        }) 
開發者ID:erigones,項目名稱:esdc-ce,代碼行數:21,代碼來源:views.py

示例2: password_reset

# 需要導入模塊: from django.contrib.auth import views [as 別名]
# 或者: from django.contrib.auth.views import password_reset [as 別名]
def password_reset(request):
    u"""View responsible for password reset."""
    return auth_views.password_reset(
        request,
        template_name='auth/password_reset.html',
        post_reset_redirect='login',
        from_email=FROM_ADDRESS,
        subject_template_name='emails/password_reset.subject',
        email_template_name='emails/password_reset.txt',
        html_email_template_name='emails/password_reset.html',
    ) 
開發者ID:stxnext-csr,項目名稱:volontulo,代碼行數:13,代碼來源:auth.py

示例3: test_password_reset_url_and_template

# 需要導入模塊: from django.contrib.auth import views [as 別名]
# 或者: from django.contrib.auth.views import password_reset [as 別名]
def test_password_reset_url_and_template(self):
        self.check_url('/accounts/password/reset/', auth_views.password_reset)
        self.check_template('accounts:password-reset',
                            'accounts/password_reset.html') 
開發者ID:nlhkabu,項目名稱:connect,代碼行數:6,代碼來源:test_views.py


注:本文中的django.contrib.auth.views.password_reset方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。