コード例 #1
1
ファイル: urls.py プロジェクト: mathuin/pyment
from django.urls import path
from accounts.views import register, my_account, order_details, order_info
from django.contrib.auth.views import LoginView, LogoutView, PasswordChangeView

app_name = 'accounts'
urlpatterns = [
    path('register/', register, {'template_name': 'registration/register.html'}, name='register'),
    path('my_account/', my_account, {'template_name': 'registration/my_account.html'}, name='my_account'),
    path('order_details/<order_id>/', order_details, {'template_name': 'registration/order_details.html'}, name='order_details'),
    path('order_info/', order_info, {'template_name': 'registration/order_info.html'}, name='order_info'),
]

urlpatterns += [
    path('login/', LoginView.as_view(), {'template_name': 'registration/login.html'}, name='login'),
    path('logout/', LogoutView.as_view(), {'template_name': 'registration/logout.html'}, name='logout'),
    path('password_change/', PasswordChangeView.as_view(), name='password_change')
]
コード例 #2
0
def rattic_change_password(request, *args, **kwargs):
    if request.user.has_usable_password():
        # If a user is changing their password
        return password_change.as_view(request)
    else:
        # If a user is setting an initial password
        kwargs['password_change_form'] = SetPasswordForm
        return password_change.as_view(request, *args, **kwargs)
コード例 #3
0
def password_change_proxy(request, *args, **kwargs):
    """ Proxies the django.contrib.auth view. Only lets a user see the form or POST to it
        if the user is not a member of an integrated portal. """
    user = request.user
    if user.is_authenticated and check_user_integrated_portal_member(user):
        return TemplateResponse(request, 'cosinnus/registration/password_cannot_be_changed_page.html')
    return PasswordChangeView.as_view(*args, **kwargs)(request)
コード例 #4
0
ファイル: auth.py プロジェクト: d9pouces/django-floor
def set_password(request):
    """Define a new password for the user"""
    if settings.USE_ALL_AUTH:
        # noinspection PyPackageRequirements
        from allauth.account.views import password_change

        return password_change(request)
    return PasswordChangeView.as_view()(request)
コード例 #5
0
ファイル: auth.py プロジェクト: parcox/django-floor
def set_password(request):
    """Define a new password for the user"""
    if settings.USE_ALL_AUTH:
        # noinspection PyPackageRequirements
        from allauth.account.views import password_change

        return password_change(request)
    return PasswordChangeView.as_view()(request)
コード例 #6
0
def password_change(request):
    return PasswordChangeView.as_view(
        form_class=PasswordChangeForm,
        template_name='castleapartments/login.html',
        extra_context={
            "authenticated": request.user.is_authenticated,
            "user": request.user,
        },
        success_url=reverse(account)
    )(request)
コード例 #7
0
 def password_change(self, request, extra_context=None):
     """
     Handle the "change password" task -- both form display and validation.
     """
     from django.contrib.admin.forms import AdminPasswordChangeForm
     from django.contrib.auth.views import PasswordChangeView
     url = reverse('admin:password_change_done', current_app=self.name)
     defaults = {
         'form_class': AdminPasswordChangeForm,
         'success_url': url,
         'extra_context': {**self.each_context(request), **(extra_context or {})},
     }
     if self.password_change_template is not None:
         defaults['template_name'] = self.password_change_template
     request.current_app = self.name
     return PasswordChangeView.as_view(**defaults)(request)
コード例 #8
0
 def password_change(self, request, extra_context=None):
     """
     Handle the "change password" task -- both form display and validation.
     """
     from django.contrib.admin.forms import AdminPasswordChangeForm
     from django.contrib.auth.views import PasswordChangeView
     url = reverse('admin:password_change_done', current_app=self.name)
     defaults = {
         'form_class': AdminPasswordChangeForm,
         'success_url': url,
         'extra_context': {**self.each_context(request), **(extra_context or {})},
     }
     if self.password_change_template is not None:
         defaults['template_name'] = self.password_change_template
     request.current_app = self.name
     return PasswordChangeView.as_view(**defaults)(request)
コード例 #9
0
ファイル: sites.py プロジェクト: Kenstogram/my-first-blog
    def password_change(self, request, extra_context=None):
        """
<<<<<<< HEAD
        Handles the "change password" task -- both form display and validation.
=======
        Handle the "change password" task -- both form display and validation.
>>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435
        """
        from django.contrib.admin.forms import AdminPasswordChangeForm
        from django.contrib.auth.views import PasswordChangeView
        url = reverse('admin:password_change_done', current_app=self.name)
        defaults = {
            'form_class': AdminPasswordChangeForm,
            'success_url': url,
            'extra_context': dict(self.each_context(request), **(extra_context or {})),
        }
        if self.password_change_template is not None:
            defaults['template_name'] = self.password_change_template
        request.current_app = self.name
        return PasswordChangeView.as_view(**defaults)(request)
コード例 #10
0
    def password_change(self, request, extra_context=None):
        self.logger.debug("In Password change done")

        # Update password on Cognito User Pool
        if request.method == 'POST':
            try:
                cognitoUserMgmt = CognitoUserMgmt()

                new_password = request.POST['new_password1']
                old_password = request.POST['old_password']

                cognitoUserMgmt.cog_change_pwd(request.user.username,
                                               old_password, new_password)

            except CognitoUserMgmtException as cogEx:
                self.logger.error(
                    "CognitoUserMgmtException occurred in while changing password of user from Admin : "
                    "{}".format(cogEx.message))
                raise ExceptionUtility.create_exception_detail(
                    ExceptionConstants.CODE_COGNITO_USER_MGMT_EXCEPTION,
                    ExceptionConstants.USERMESSAGE_COGNITO_USER_MGMT_EXCEPTION,
                    cogEx.message, BusinessException.__name__)

        # Handle Default Django Request processing
        from django.contrib.admin.forms import AdminPasswordChangeForm
        from django.contrib.auth.views import PasswordChangeView
        url = reverse('admin:password_change_done', current_app=self.name)
        defaults = {
            'form_class': AdminPasswordChangeForm,
            'success_url': url,
            'extra_context': {
                **self.each_context(request),
                **(extra_context or {})
            },
        }
        if self.password_change_template is not None:
            defaults['template_name'] = self.password_change_template
        request.current_app = self.name

        return PasswordChangeView.as_view(**defaults)(request)
コード例 #11
0
ファイル: test_templates.py プロジェクト: zzjeric/django
    def test_titles(self):
        rf = RequestFactory()
        user = User.objects.create_user('jsmith', '*****@*****.**', 'pass')
        user = authenticate(username=user.username, password='******')
        request = rf.get('/somepath/')
        request.user = user

        response = PasswordResetView.as_view(success_url='dummy/')(request)
        self.assertContains(response, '<title>Password reset</title>')
        self.assertContains(response, '<h1>Password reset</h1>')

        response = PasswordResetDoneView.as_view()(request)
        self.assertContains(response, '<title>Password reset sent</title>')
        self.assertContains(response, '<h1>Password reset sent</h1>')

        # PasswordResetConfirmView invalid token
        response = PasswordResetConfirmView.as_view(success_url='dummy/')(request, uidb64='Bad', token='Bad')
        self.assertContains(response, '<title>Password reset unsuccessful</title>')
        self.assertContains(response, '<h1>Password reset unsuccessful</h1>')

        # PasswordResetConfirmView valid token
        default_token_generator = PasswordResetTokenGenerator()
        token = default_token_generator.make_token(user)
        uidb64 = force_text(urlsafe_base64_encode(force_bytes(user.pk)))
        response = PasswordResetConfirmView.as_view(success_url='dummy/')(request, uidb64=uidb64, token=token)
        self.assertContains(response, '<title>Enter new password</title>')
        self.assertContains(response, '<h1>Enter new password</h1>')

        response = PasswordResetCompleteView.as_view()(request)
        self.assertContains(response, '<title>Password reset complete</title>')
        self.assertContains(response, '<h1>Password reset complete</h1>')

        response = PasswordChangeView.as_view(success_url='dummy/')(request)
        self.assertContains(response, '<title>Password change</title>')
        self.assertContains(response, '<h1>Password change</h1>')

        response = PasswordChangeDoneView.as_view()(request)
        self.assertContains(response, '<title>Password change successful</title>')
        self.assertContains(response, '<h1>Password change successful</h1>')
コード例 #12
0
from finances.urls import finances_patterns
from modules.urls import modules_patterns
from sales.urls import sales_patterns
from shops.urls import shops_patterns
from stocks.urls import stocks_patterns
from users.urls import users_patterns


urlpatterns = [
    # AUTHENTIFICATIONS
    path('', ModulesLoginView.as_view(), name='url_login'),
    path('auth/', include([
        path('login/', ModulesLoginView.as_view(), name='url_login'),
        path('logout/', LogoutView.as_view(), name='url_logout'),

        path('password_change/', PasswordChangeView.as_view(),
             name='password_change'),
        path('password_change/done/', PasswordChangeDoneView.as_view(),
             name='password_change_done'),

        path('password_reset/', PasswordResetView.as_view(),
             name='password_reset'),
        path('password_reset/done/', PasswordResetDoneView.as_view(),
             name='password_reset_done'),
        path('reset/<uidb64>/<token>/', PasswordResetConfirmView.as_view(),
             name='password_reset_confirm'),
        path('reset/done/', PasswordResetCompleteView.as_view(),
             name='password_reset_complete'),
    ])),
    # WORKBOARDS
    path('members/', MembersWorkboard.as_view(), name='url_members_workboard'),
コード例 #13
0
ファイル: urls.py プロジェクト: tahirs95/django_quickstart95
# app_name = 'reviewer'

urlpatterns = [
    path('admin/', admin.site.urls),
    path('course/', include(('reviewer.urls', 'reviewer'),
                            namespace='reviewer')),
    path('signup/', views.signup, name='signup'),
    path('accounts/', include('django.contrib.auth.urls')),
    path('login/',
         LoginView.as_view(template_name='authentication/login.html'),
         name='login'),
    path('logout/',
         LogoutView.as_view(next_page=reverse_lazy('reviewer:home')),
         name='logout'),
    path('password_change/',
         PasswordChangeView.as_view(
             template_name='authentication/password_change_form.html'),
         name='password_change'),
    path('password_change/done/',
         PasswordChangeDoneView.as_view(
             template_name='authentication/password_change_done.html'),
         name='password_change_done'),
    path(
        'password_reset/',
        PasswordResetView.as_view(
            template_name='authentication/password_reset_form.html',
            email_template_name='authentication/password_reset_email.html',
            subject_template_name='authentication/password_reset_subject.txt'),
        name='password_reset'),
    path('password_reset/done/',
         PasswordResetDoneView.as_view(
             template_name='authentication/password_reset_done.html'),
コード例 #14
0
from django.conf.urls import include, url
from django.contrib import admin

from registration.backends.model_activation.views import RegistrationView
from django.contrib.auth.views import PasswordChangeView, PasswordResetView, PasswordResetConfirmView, PasswordResetCompleteView
from app.forms import RegistrationForm, PasswordChangeForm, PasswordResetForm, SetPasswordForm

admin.autodiscover()

admin.site.site_header = "CFA administration"

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^accounts/password/change/$', PasswordChangeView.as_view(form_class=PasswordChangeForm, success_url="done"), name='auth_password_change'),
    url(r'^accounts/password/reset/$', PasswordResetView.as_view(form_class=PasswordResetForm, success_url="done"), name='auth_password_reset'),
    url(r'^accounts/password/reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
        PasswordResetConfirmView.as_view(form_class=SetPasswordForm),
        name='password_reset_confirm'),
    url(r'^accounts/password/reset/complete/$', PasswordResetCompleteView.as_view(), name='password_reset_complete'),
    url(r'^accounts/register/$', RegistrationView.as_view(form_class=RegistrationForm), name='registration_register'),
    url(r'^accounts/', include('registration.backends.model_activation.urls')),
    url(r'', include('app.urls')),
]
コード例 #15
0
ファイル: urls.py プロジェクト: artrey/reports-generator
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, reverse_lazy, include
from django.contrib.auth.views import LoginView, LogoutView, PasswordChangeView

from report.urls import urls

urlpatterns = [
    path('', include(urls)),
    path('admin/', admin.site.urls),
    path('login/',
         LoginView.as_view(template_name='auth/login.html'),
         name='login'),
    path('logout/',
         LogoutView.as_view(next_page=reverse_lazy('login')),
         name='logout'),
    path('password-change/',
         PasswordChangeView.as_view(
             success_url=reverse_lazy('send_report'),
             template_name='report/password_change.html'),
         name='password-change'),
    path('ckeditor/', include('ckeditor_uploader.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
コード例 #16
0
ファイル: urls.py プロジェクト: ksradau/colorin
from django.contrib.auth.views import LoginView
from django.contrib.auth.views import LogoutView
from django.contrib.auth.views import PasswordChangeDoneView
from django.contrib.auth.views import PasswordChangeView
from django.urls import path

from apps.authorization.views import SignUpView

urlpatterns = [
    path("login/", LoginView.as_view(), name="login"),
    path("logout/", LogoutView.as_view(), name="logout"),
    path("password_change_form/",
         PasswordChangeView.as_view(),
         name="password_change"),
    path(
        "password_change_done/",
        PasswordChangeDoneView.as_view(),
        name="password_change_done",
    ),
    path("registration/", SignUpView.as_view(), name="signup"),
]
コード例 #17
0
	path('category/all/',CategoryList.as_view(),name="CategoryList"),
	path('category/<slug:category_slug>/',SelectedTopicList.as_view(),name="SelectedTopicList"),
	path('ajaxcall/topicautocomplete/',autocompleteSuggestionTopic,name="AjaxTopicAutocomplete"),

	path('youtubeResource/',youtubeResource,name="youtubeResource"),
	path('youtubeResourcePreview/',youtubeResourcePreview,name="youtubeResourcePreview"),

	]


urlpatterns+=[
	path('login/',LoginView.as_view(redirect_authenticated_user=True),name="login"),
	path('logout/',LogoutView.as_view(),name="logout"),
	path('signup/',SignupView.as_view(),name="signup"),

	path('myaccount/change_password',PasswordChangeView.as_view(),name="change_password"),
	
	path('myaccount/password_change_done/',PasswordChangeDoneView.as_view(),name="password_change_done"),

	path('forgot_password/',strictly_no_login(PasswordResetView.as_view()),name="forgot_password"),
	path('password_reset/done/', PasswordResetDoneView.as_view(), name='password_reset_done'),

    path('reset/<slug:uidb64>/<str:token>/',PasswordResetConfirmView.as_view, name='password_reset_confirm'),
    path('reset/done/', PasswordResetCompleteView.as_view(), name='password_reset_complete'),
]
#to avoid errors
urlpatterns+=[
	path('<slug:slug>/',TopicDetails.as_view(),name="TopicDetails"),
	path('<slug:slug>/test',test,name="test"),
]
# urlpatterns += staticfiles_urlpatterns()
コード例 #18
0
from django.conf.urls import url
from django.contrib.auth.views import PasswordChangeView, PasswordChangeDoneView, PasswordResetView, \
    PasswordResetDoneView, PasswordResetConfirmView, PasswordResetCompleteView
from django.urls import path, re_path

from . import views
from .views import SignUpView

urlpatterns = [
    path('signup/', SignUpView.as_view(), name='signup'),
    # url(r'^password_change/$', views.password_change, name='password_change'),
    re_path(r'^password_change/$',
            PasswordChangeView.as_view(
                template_name='registration/my_password_change.html'),
            name='my_password_change'),
    re_path(r'^password_change/done/$',
            PasswordChangeDoneView.as_view(
                template_name='registration/password_change_success.html'),
            name='password_change_success'),
    re_path(r'^password_reset/$',
            PasswordResetView.as_view(
                template_name='registration/password_reset.html'),
            name='password_reset'),
    re_path(r'^password_reset/done/$',
            PasswordResetDoneView.as_view(
                template_name='registration/password_reset_done.html'),
            name='password_reset_done'),
    re_path(
        r'^password/reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/',
        PasswordResetConfirmView.as_view(
            template_name='registration/password_reset_confirmation.html'),
コード例 #19
0
 url(r'logout.html', views.logout, name='logout'),
 url(r'login/$', auth_views.login, name='login'),
 url(r'^instructor/(?P<hash>[^/]+)/$',
     views.instructor_ranking,
     name='instructor_ranking'),
 url(r'^modify_apps/(?P<student_pk>\w+)/$',
     views.modify_apps,
     name='modify_apps'),
 url(r'number_tas.html', views.assign_tas, name='number_tas'),
 url(r'upload_front_matter.html',
     views.upload_front_matter,
     name='upload_front_matter'),
 url(r'ranking_status.html', views.ranking_status, name='ranking_status'),
 url(r'export.html', views.export, name='export'),
 url(r'^password_change/$',
     PasswordChangeView.as_view(
         template_name='accounts/password_change_form.html'),
     name='password_change'),
 url(r'^password_change/done/$',
     PasswordChangeDoneView.as_view(
         template_name='accounts/password_change_done.html'),
     name='password_change_done'),
 url(r'^password_reset/$',
     PasswordResetView.as_view(
         template_name='accounts/password_reset_form.html'),
     name='password_reset'),
 url(r'^password_reset/done/$',
     PasswordResetDoneView.as_view(
         template_name='accounts/password_reset_done.html'),
     name='password_reset_done'),
 url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
     PasswordResetConfirmView.as_view(
コード例 #20
0
ファイル: test_templates.py プロジェクト: cloudera/hue
 def test_PasswordResetChangeView(self):
     response = PasswordChangeView.as_view(success_url='dummy/')(self.request)
     self.assertContains(response, '<title>Password change</title>')
     self.assertContains(response, '<h1>Password change</h1>')
コード例 #21
0
ファイル: urls.py プロジェクト: ccnmtl/djangowind
from django.contrib.auth.views import (
    logout_then_login, redirect_to_login,
    PasswordResetView, PasswordResetDoneView,
    PasswordChangeView, PasswordChangeDoneView,
    PasswordResetConfirmView, PasswordResetCompleteView
)

urlpatterns = [
    url(r'^login/$', login),
    url(r'^caslogin/$', caslogin, {}, 'cas-login'),
    url(r'^logout/$', logout),

    url(r'^logout_then_login/$', logout_then_login),
    url(r'^redirect_to_login/$', redirect_to_login),

    url('^password_change/done/', PasswordChangeDoneView.as_view(),
        name='password_change_done'),
    url('^password_change/', PasswordChangeView.as_view(),
        name='password_change'),

    url('^password_reset/done/', PasswordResetDoneView.as_view(),
        name='password_reset_done'),
    url('^password/reset/confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/',
        PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
    url('^password/reset/complete/',
        PasswordResetCompleteView.as_view(),
        name='password_reset_complete'),
    url('^password_reset/', PasswordResetView.as_view(),
        name='password_reset')
]
コード例 #22
0
    }
}

urlpatterns = [
    url(r'^domain/select/$', select, name='domain_select'),
    url(r'^domain/select_redirect/$',
        select, {'do_not_redirect': True},
        name='domain_select_redirect'),
    url(r'^domain/transfer/(?P<guid>\w+)/activate$',
        ActivateTransferDomainView.as_view(),
        name='activate_transfer_domain'),
    url(r'^domain/transfer/(?P<guid>\w+)/deactivate$',
        DeactivateTransferDomainView.as_view(),
        name='deactivate_transfer_domain'),
    url(r'^accounts/password_change/$',
        PasswordChangeView.as_view(
            template_name='login_and_password/password_change_form.html'),
        name='password_change'),
    url(r'^accounts/password_change_done/$',
        PasswordChangeDoneView.as_view(
            template_name='login_and_password/password_change_done.html',
            extra_context={
                'current_page': {
                    'page_name': _('Password Change Complete')
                }
            }),
        name='password_change_done'),
    url(r'^accounts/password_reset_email/$',
        PasswordResetView.as_view(**PASSWORD_RESET_KWARGS),
        name='password_reset_email'),
    url(r'^accounts/password_reset_email/done/$',
        PasswordResetDoneView.as_view(**PASSWORD_RESET_DONE_KWARGS),
コード例 #23
0
urlpatterns = [
    path('', TemplateView.as_view(template_name='home.html'), name='home'),
    path('clients/', include('clients.urls')),
    path('admin/', admin.site.urls),
    path('users/', include('users.urls')),
    path('users/', include('django.contrib.auth.urls')),
    re_path(r'^accounts/login/$',
            LoginView.as_view(template_name='registration/login.html'),
            name="login"),
    re_path(r'^accounts/logout/$',
            LogoutView.as_view(template_name='registration/logout.html'),
            LogoutView.next_page,
            name="logout"),
    re_path(r'^accounts/password/change/$',
            PasswordChangeView.as_view(
                template_name='registration/change-password.html'),
            name='password_change'),
    re_path(r'^accounts/password/change/done/$',
            PasswordChangeDoneView.as_view(
                template_name='registration/change-password-done.html'),
            name='password_change_done'),
    re_path(r'^accounts/password/reset/$',
            PasswordResetView.as_view(
                template_name='registration/password_reset_page.html'),
            name='password_reset'),
    re_path(r'^accounts/password/reset/done/$',
            PasswordResetDoneView.as_view(
                template_name='registration/passwordreset_pagedone.html'),
            name='password_reset_done'),
    re_path(
        r'^accounts/password/reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/',
コード例 #24
0
ファイル: urls.py プロジェクト: hirenchalodiya1/ta_portal
from django.views.generic import RedirectView, TemplateView
from .views import ProfileDetailView, LoginView, CourseFeedbackView, CourseDetailView
from adminportal.views import Pdf
from django.contrib.auth.views import PasswordChangeView, PasswordChangeDoneView

app_name = 'frontend'

urlpatterns = [
    path('details/', ProfileDetailView.as_view(), name='detail'),
    path('login/', LoginView.as_view(), name='login'),
    path('logout/',
         auth_views.LogoutView.as_view(next_page='frontend:login'),
         name='logout'),
    path('', RedirectView.as_view(pattern_name='frontend:detail')),
    path('past/', CourseDetailView.as_view(), name='past'),
    path('current/', CourseFeedbackView.as_view(), name='current'),
    path('timetable/',
         TemplateView.as_view(template_name='frontend/timetable.html'),
         name='timetable'),
    path('pdf/', Pdf.as_view(), name='pdf'),
    path('details/password-change/',
         PasswordChangeView.as_view(
             success_url='/details/password-change/done',
             template_name='frontend/password_reset_form.html'),
         name='password_change'),
    path('details/password-change/done/',
         PasswordChangeDoneView.as_view(
             template_name='frontend/password_reset_done.html'),
         name='password_change_done')
]
コード例 #25
0
from django.contrib.auth.views import PasswordChangeDoneView
from django.contrib.auth.views import PasswordChangeView
from django.urls import path

from . import views

urlpatterns = [
    path("", views.index, name="index"),
    path("new", views.new, name="new"),
    path("login", LoginView.as_view(template_name="login.html"), name="login"),
    path("logout",
         LogoutView.as_view(template_name="logout.html"),
         name="logout"),
    path(
        "change-password",
        PasswordChangeView.as_view(template_name="change-password.html"),
    ),
    path(
        "change-password/done",
        PasswordChangeDoneView.as_view(
            template_name="change-password-done.html"),
        name="password_change_done",
    ),
    path("register", views.register, name="register"),
    path("authored", views.authored, name="authored"),
    path("all", views.all, name="all"),
    path("random_answers", views.random_answers, name="random_answers"),
    path("puzzle/<int:id>", views.puzzle, name="puzzle"),
    path("puzzle/<int:id>/edit", views.puzzle_edit, name="puzzle_edit"),
    path("puzzle/<int:id>/people", views.puzzle_people, name="puzzle_people"),
    path("puzzle/<int:id>/answers",
コード例 #26
0
ファイル: urls.py プロジェクト: Lusi01/realworlddjango
    path('password-reset/',
         views.CustomPasswordResetView.as_view(),
         name='password_reset'),
    path('password-reset-done/',
         views.CustomPasswordResetDoneView.as_view(),
         name='password_reset_done'),
    path('password-reset-confirm/<str:uidb64>/<str:token>',
         views.CustomPasswordResetConfirmView.as_view(),
         name='password_reset_confirm'),
    path('password-reset-complete/',
         views.CustomPasswordResetCompleteView.as_view(),
         name='password_reset_complete'),

    # Password change
    path('password-change/',
         PasswordChangeView.as_view(
             template_name='accounts/registration/password_change.html',
             form_class=CustomPasswordChangeForm,
             success_url=reverse_lazy('accounts:password_change_done')),
         name='password_change'),
    #    path('password-change/',  views.CustomPasswordChangeView.as_view(), name='password_change'),

    # path('password-change-done/',
    #      PasswordChangeDoneView.as_view(
    #          template_name='accounts/registration/password_change_done.html'
    #      ),
    #      name='password_change_done'),
    path('password-change-done/',
         views.CustomPasswordChangeDoneView.as_view(),
         name='password_change_done'),
]
コード例 #27
0
ファイル: urls.py プロジェクト: ryannetwork/jsword
from django.urls import path, reverse_lazy
from django.contrib.auth.views import LoginView, LogoutView, PasswordChangeView, PasswordChangeDoneView
from . import views

app_name = 'accounts'

urlpatterns = [
    path('login/', LoginView.as_view(template_name='accounts/login.html'), name="login"),
    path('logout/', LogoutView.as_view(), name="logout"),
    path('password_change/', PasswordChangeView.as_view(template_name='accounts/password_change.html',
                                                        success_url=reverse_lazy('accounts:password_change_done')),
         name="password_change"),
    path('password_change/done/', PasswordChangeDoneView.as_view(template_name='accounts/password_change_done.html'),
         name="password_change_done"),
    path('home/', views.home, name="home"),
]
コード例 #28
0
ファイル: urls.py プロジェクト: KishwarMaheen/myproject
    # revise the password reset urls
    path('reset/',
         PasswordResetView.as_view(
             template_name="password_reset.html",
             email_template_name="password_reset_email.html",
             subject_template_name="password_reset_subject.txt"),
         name="password_reset"),
    path('reset/done/',
         PasswordResetDoneView.as_view(
             template_name="password_reset_done.html"),
         name='password_reset_done'),
    path('reset/<uidb64>/<token>/',
         PasswordResetConfirmView.as_view(
             template_name="password_reset_confirm.html"),
         name="password_reset_confirm"),
    path('reset/complete/',
         PasswordResetCompleteView.as_view(
             template_name="password_reset_complete.html"),
         name="password_reset_complete"),
    path('settings/password/',
         PasswordChangeView.as_view(template_name="password_change.html"),
         name='password_change'),
    path('settings/password/done/',
         PasswordChangeDoneView.as_view(
             template_name="password_change_done.html"),
         name='password_change_done'),
    path('settings/account/',
         views.UserUpdateView.as_view(),
         name="my_account"),
]
コード例 #29
0
ファイル: urls.py プロジェクト: BenMotz/cubetoolkit
    PasswordChangeView,
    PasswordChangeDoneView,
    PasswordResetConfirmView,
    PasswordResetCompleteView
)


urlpatterns = [
    url(r'^login/$',
        LoginView.as_view(template_name='login.html'),
        name='login'),
    url(r'^logout/$',
        LogoutView.as_view(template_name='logout.html'),
        name='logout'),
    url(r'^password_change/$',
        PasswordChangeView.as_view(
           template_name='password_change_form.html'),
        name='password_change'),
    url(r'^password_change/done/$',
        PasswordChangeDoneView.as_view(
           template_name='password_change_done.html'),
        name='password_change_done'),
    url(r'^password_reset/$',
        PasswordResetView.as_view(
            template_name='password_reset_form.html',
            email_template_name='password_reset_email.html',
            subject_template_name='password_reset_subject.txt',
            from_email=settings.VENUE['mailout_delivery_report_to'],
            extra_email_context=settings.VENUE),  # TODO make this work
        name='password_reset'),
    url(r'^password_reset/done/$',
        PasswordResetDoneView.as_view(
コード例 #30
0
    path('delete_order/<str:pk>/', views.deleteOrder, name="delete_order"),
    path('addItem/', views.addItem, name="addItem"),
    path('update_item/<str:pk>/', views.updateitem, name="update_item"),
    path('reset_password/',
         auth_views.PasswordResetView.as_view(
             template_name='stores/password_reset.html'),
         name="reset_password"),
    path('reset_password_sent/',
         auth_views.PasswordResetDoneView.as_view(
             template_name='stores/password_reset_sent.html'),
         name="password_reset_done"),
    path('reset/<uidb64>/<token>/',
         auth_views.PasswordResetConfirmView.as_view(
             template_name='stores/password_reset_form.html'),
         name="password_reset_confirm"),
    path('reset_password_complete/',
         auth_views.PasswordResetCompleteView.as_view(
             template_name='stores/password_reset_done.html'),
         name="password_reset_complete"),
    path('change_password/',
         PasswordChangeView.as_view(
             template_name='stores/change_password.html',
             success_url=reverse_lazy('password_change_done'),
             form_class=MyPasswordChangeForm),
         name='password_change'),
    path('change_password/done/',
         PasswordChangeDoneView.as_view(
             template_name='stores/password_change_done.html'),
         name='password_change_done'),
]
コード例 #31
0
                                        PasswordChangeView,
                                        PasswordChangeDoneView )


urlpatterns = [

    path('', employee_details, name='employee_details'),

    path('login/', LoginView.as_view(template_name = "connect/login.html"), name='login'),
    path('signup/', UserCreateView.as_view(), name='signup'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('password-reset/', PasswordResetView.as_view(template_name="connect/password_reset_form.html", email_template_name="connect/password_reset_email.html"), name='password_reset'),
    path('password-reset/done/', PasswordResetDoneView.as_view(template_name="connect/password_reset_done.html"), name='password_reset_done'),
    path('reset/<uidb64>/<token>/', PasswordResetConfirmView.as_view(template_name="connect/password_confirm.html"), name='password_reset_confirm'),
    path('reset/done/', PasswordResetCompleteView.as_view(template_name="connect/password_reset_complete.html"), name='password_reset_complete'),
    path('password-change/', PasswordChangeView.as_view(template_name='connect/password_change.html'), name='password_change'),
    path('password-change/done/', PasswordChangeDoneView.as_view(template_name='connect/password_change_done.html'), name='password_change_done'),

    path('personal', PersonalDetailsView.as_view(), name="personal"),
    path('official', OfficialDetailsView.as_view(), name="official"),
    path('training', TrainingDetailsView.as_view(), name="training"),
    path('project', ProjectDetailsView.as_view(), name="project"),
    path('finance', FinancialDetailsView.as_view(), name="finance"),
    path('invoicing', InvoicingDetailsView.as_view(), name="invoicing"),
    path('bench', BenchDetailsView.as_view(), name="bench"),
    path('prospect', ProspectDetailsView.as_view(), name="prospect"),
    path('personal-update/<int:pk>', PersonalDetailsUpdateView.as_view(), name="personal-update"),
    path('official-update/<int:pk>', OfficialDetailsUpdateView.as_view(), name="official-update"),
    path('training-update/<int:pk>', TrainingDetailsUpdateView.as_view(), name="training-update"),
    path('project-update/<int:pk>', ProjectDetailsUpdateView.as_view(), name="project-update"),
    path('finance-update/<int:pk>', FinancialDetailsUpdateView.as_view(), name="finance-update"),
コード例 #32
0
ファイル: urls.py プロジェクト: zhiyuli/HydroLearn
        {'sitemaps': {'cmspages': CMSSitemap}}),
]

urlpatterns += i18n_patterns(

    # include accounts url
    url(r'^accounts/login/$', LoginView.as_view(), name='login'),
    url(r'^accounts/logout/$', LogoutView.as_view(next_page='/'), name='logout'),
    url(r'^accounts/register/$', RegisterView.as_view(), name="register"),

    # password reset views (Currently don't work as requires email)
    url(r'^accounts/PasswordReset/$', PasswordResetView.as_view(), name='password_reset'),
    url(r'^accounts/PasswordResetConfirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$', PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
    url(r'^accounts/PasswordResetComplete/$', PasswordResetCompleteView.as_view(), name='password_reset_complete'),

    # password change views
    url(r'^accounts/PasswordChange/$', PasswordChangeView.as_view(), name='password_change'),
    url(r'^accounts/PasswordChangeDone/$', PasswordChangeDoneView.as_view(), name='password_change_done'),


    url(r'^admin/', include(admin.site.urls)),  # NOQA
    url(r'^', include('cms.urls')),
)  + staticfiles_urlpatterns()

# This is only needed when using runserver.
if settings.DEBUG:
    urlpatterns = [
        url(r'^media/(?P<path>.*)$', serve,
            {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
        ] + staticfiles_urlpatterns() + urlpatterns
コード例 #33
0
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth.views import LoginView, LogoutView, PasswordChangeView, PasswordChangeDoneView
from django.contrib.flatpages import views

urlpatterns = [
    url(r'^accounts/login/$', LoginView.as_view(), name='login'),
    url(r'^accounts/logout/$', LogoutView.as_view(), name='logout'),
    url(r'^accounts/password/change/$', PasswordChangeView.as_view(), name='password_change'),
    url(r'^accounts/password/change/done/$', PasswordChangeDoneView.as_view(), name='password_change_done'),

    url(r'^timealign/', include('annotations.urls', namespace='annotations')),
    url(r'^preselect/', include('selections.urls', namespace='selections')),
    url(r'^stats/', include('stats.urls', namespace='stats')),
    url(r'^news/', include('news.urls', namespace='news')),

    url(r'^admin/', include(admin.site.urls)),

    url(r'^$', views.flatpage, {'url': '/home/'}, name='home'),
    url(r'^project/$', views.flatpage, {'url': '/project/'}, name='project'),
    url(r'^project/nl-summary/$', views.flatpage, {'url': '/project/nl-summary/'}, name='nl-summary'),
    url(r'^project/collaborations/$', views.flatpage, {'url': '/project/collaborations/'}, name='collaborations'),
    url(r'^project/videos/$', views.flatpage, {'url': '/project/videos/'}, name='videos'),
    url(r'^publications/$', views.flatpage, {'url': '/publications/'}, name='publications'),
コード例 #34
0
ファイル: urls.py プロジェクト: tohugaby/riclibre
from referendum.views.legal import LegalView
from referendum.views.like import LikeView

urlpatterns = [
    path('', IndexView.as_view(), name='index'),
    path('legal', LegalView.as_view(), name='legal'),
    path('contact', ContactView.as_view(), name='contact'),
    path('account/<pk>', AccountView.as_view(), name='account'),
    path('signup', SignupView.as_view(), name='signup'),
    path('signup-confirm', SignupConfirmView.as_view(), name='signup_confirm'),
    path('ask-account-activation/', AskAccountActivationView.as_view(), name='ask_account_activation'),
    path('account-activation/<uidb64>/<token>/', AccountActivationView.as_view(), name='account_activation'),
    path('login', LoginView.as_view(redirect_authenticated_user=True, authentication_form=CustomLoginForm),
         name='login'),
    path('logout', LogoutView.as_view(), name='logout'),
    path('password_change', PasswordChangeView.as_view(
        template_name='registration/custom_password_change_form.html', form_class=CustomPasswordChangeForm),
         name='password_change'),
    path('password_change/done',
         PasswordChangeDoneView.as_view(template_name='registration/custom_password_change_done.html'),
         name='password_change_done'),
    path('password_reset',
         CustomPasswordResetView.as_view(template_name='registration/custom_password_reset_form.html',
                                         form_class=CustomPasswordResetForm),
         name='password_reset'),
    path('password_reset/done',
         PasswordResetDoneView.as_view(template_name='registration/custom_password_reset_done.html'),
         name='password_reset_done'),
    path('password_reset/<uidb64>/<token>/', PasswordResetConfirmView.as_view(
        template_name='registration/custom_password_reset_confirm.html', form_class=CustomSetPasswordForm),
         name='password_reset_confirm'),
    path('reser/done',
コード例 #35
0
    ),
    path(
        "reset/<str:uidb64>/<str:token>/",
        PasswordResetConfirmView.as_view(
            template_name="accounts/password_reset_confirm.html",
            success_url=reverse_lazy("accounts:password_reset_complete"),
        ),
        name="password_reset_confirm",
    ),
    path(
        "reset/complete/",
        PasswordResetCompleteView.as_view(
            template_name="accounts/password_reset_complete.html"),
        name="password_reset_complete",
    ),
    path(
        "settings/password/",
        PasswordChangeView.as_view(
            template_name="accounts/password_change.html",
            success_url=reverse_lazy("accounts:password_change_done"),
        ),
        name="password_change",
    ),
    path(
        "settings/password/done/",
        PasswordChangeDoneView.as_view(
            template_name="accounts/password_change_done.html"),
        name="password_change_done",
    ),
]
コード例 #36
0
 path("profile/", profile),
 path("admin/", admin.site.urls),
 path("login/", LoginView.as_view(template_name="authn/login.html"), name="login"),
 path(
     "logout/",
     LogoutView.as_view(template_name="authn/logged_out.html"),
     name="logout",
 ),
 path(
     "password_change/done/",
     PasswordChangeDoneView.as_view(template_name="authn/password_change_done.html"),
     name="password_change_done",
 ),
 path(
     "password_change/",
     PasswordChangeView.as_view(template_name="authn/password_change_form.html"),
     name="password_change",
 ),
 path(
     "password_reset/done/",
     PasswordResetDoneView.as_view(template_name="authn/password_reset_done.html"),
     name="password_reset_done",
 ),
 path(
     "password_reset/",
     PasswordResetView.as_view(template_name="authn/password_reset_form.html"),
     name="password_reset",
 ),
 path(
     "reset/done/",
     PasswordResetCompleteView.as_view(
コード例 #37
0
ファイル: urls.py プロジェクト: AnimeshRy/gymrocket
from django.contrib.auth.views import PasswordChangeView, PasswordChangeDoneView

urlpatterns = [
    path('admin/', admin.site.urls),

    # App routes
    path('members/', include("apps.members.urls", namespace="members")),
    path('wallpaper/', include("apps.wallpaper.urls", namespace="wallpaper")),
    path('reports/', include("apps.reports.urls", namespace="reports")),
    path('dashboard/', include("apps.dashboard.urls", namespace="dashboard")),

    # Landing Page route
    path('', LandingPage.as_view(), name="landing-page"),

    # password change routes
    path('password_change/', PasswordChangeView.as_view(), name='password-change'),
    path('password_change_done/', PasswordChangeDoneView.as_view(),
         name='password_change_done'),

    # auth routes
    path('login/', LoginView.as_view(redirect_authenticated_user=True), name='login'),
    path('logout/', LogoutView.as_view(), name='logout')
]

# for handling profile photos
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

# Handling Static files in Debug mode
if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL,
                          document_root=settings.STATIC_ROOT)
コード例 #38
0
from .views import RegisterView

app_name = 'users'

urlpatterns = [
    path('login/',
         LoginView.as_view(template_name='users/login.html'),
         name='login'),
    path('register/', RegisterView.as_view(), name='register'),
    path('logout/',
         LogoutView.as_view(template_name='users/logged_out.html'),
         name='logout'),
    path(
        'password_change/',
        PasswordChangeView.as_view(template_name='users/password_change.html'),
        name='password_change'),
    path('password_change/done/',
         PasswordChangeDoneView.as_view(
             template_name='users/password_change_done.html'),
         name='password_change_done'),
    path('password_reset/',
         PasswordResetView.as_view(
             template_name='users/password_reset_form.html',
             email_template_name='users/password_reset_email.html',
             success_url=reverse_lazy('users:password_reset_done')),
         name='password_reset'),
    path('password_reset/done/',
         PasswordResetDoneView.as_view(
             template_name='users/password_reset_done.html'),
         name='password_reset_done'),
コード例 #39
0
ファイル: urls.py プロジェクト: visadb/ideaList
from django.conf.urls import include, url
from django.views.generic import RedirectView

from django.contrib.auth.views import LoginView, logout_then_login, PasswordChangeView, PasswordChangeDoneView

#from django.contrib import admin
#admin.autodiscover()

urlpatterns = [
    url(r'^$',          RedirectView.as_view(url='/ideaList')),
    url(r'^ideaList/',  include('ideaList.urls')),
    url(r'^login/$',    LoginView.as_view(), name='login'),
    url(r'^logout/$',   logout_then_login),
    url(r'^passwd/$',   PasswordChangeView.as_view()),
    url(r'^passwd_done/$', PasswordChangeDoneView.as_view()),
    #url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    #url(r'^admin/',     include(admin.site.urls)),
]