Beispiel #1
0
 def password_change_done(self, request, extra_context=None):
     """
     Display the "success" page after a password change.
     """
     from django.contrib.auth.views import PasswordChangeDoneView
     defaults = {
         'extra_context': {**self.each_context(request), **(extra_context or {})},
     }
     if self.password_change_done_template is not None:
         defaults['template_name'] = self.password_change_done_template
     request.current_app = self.name
     return PasswordChangeDoneView.as_view(**defaults)(request)
Beispiel #2
0
 def password_change_done(self, request, extra_context=None):
     """
     Display the "success" page after a password change.
     """
     from django.contrib.auth.views import PasswordChangeDoneView
     defaults = {
         'extra_context': {**self.each_context(request), **(extra_context or {})},
     }
     if self.password_change_done_template is not None:
         defaults['template_name'] = self.password_change_done_template
     request.current_app = self.name
     return PasswordChangeDoneView.as_view(**defaults)(request)
Beispiel #3
0
    def password_change_done(self, request, extra_context=None):
        """
<<<<<<< HEAD
        Displays the "success" page after a password change.
=======
        Display the "success" page after a password change.
>>>>>>> 37c99181c9a6b95433d60f8c8ef9af5731096435
        """
        from django.contrib.auth.views import PasswordChangeDoneView
        defaults = {
            'extra_context': dict(self.each_context(request), **(extra_context or {})),
        }
        if self.password_change_done_template is not None:
            defaults['template_name'] = self.password_change_done_template
        request.current_app = self.name
        return PasswordChangeDoneView.as_view(**defaults)(request)
Beispiel #4
0
    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>')
Beispiel #5
0
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"),
]
Beispiel #6
0
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",
         views.puzzle_answers,
         name="puzzle_answers"),
    path("puzzle/<int:id>/tags", views.puzzle_tags, name="puzzle_tags"),
    path("puzzle/<int:id>/postprod",
         views.puzzle_postprod,
Beispiel #7
0
 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})/',
     PasswordResetConfirmView.as_view(
         template_name='registration/password_reset_confirmpage.html'),
     name='password_reset_confirm'),
 re_path(r'^accounts/password/reset/complete/$',
Beispiel #8
0
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"),
]
Beispiel #9
0
 def test_PasswordChangeDoneView(self):
     response = PasswordChangeDoneView.as_view()(self.request)
     self.assertContains(response, '<title>Password change successful</title>')
     self.assertContains(response, '<h1>Password change successful</h1>')
Beispiel #10
0
 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'),
      name='password_reset_done'),
 path('reset/reset/<uidb64>/<token>/',
      PasswordResetConfirmView.as_view(
          template_name='authentication/password_reset_confirm.html'),
Beispiel #11
0
from django.contrib.auth import get_user_model
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 reverse_lazy

from .forms import LoginForm

User = get_user_model()


logout_view = LogoutView.as_view(template_name='accounts/logout.html')
login_view = LoginView.as_view(
    template_name='accounts/login.html',
    authentication_form=LoginForm
)
password_change_view = PasswordChangeView.as_view(
    template_name='accounts/password_change.html',
    success_url=reverse_lazy('accounts:password_change_done')
)
password_change_done_view = PasswordChangeDoneView.as_view(
    template_name='accounts/password_change_done.html',
)
Beispiel #12
0
    url(r'^category/(?P<category_name>.+)/$',
        views.get_posts_by_category,
        name='post_by_category'),
    path('password-reset/',
         PasswordResetView.as_view(
             template_name='mainapp/password_reset_form.html'),
         name='password_reset'),
    path('password-reset-done/',
         PasswordResetDoneView.as_view(
             template_name='mainapp/password_reset-done.html'),
         name='password_reset_done'),
    url('^password-reset-confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
        PasswordResetConfirmView.as_view(
            template_name='mainapp/password-reset-confirm.html'),
        name='password_reset_confirm'),
    path('password-reset-complete/',
         PasswordResetCompleteView.as_view(
             template_name='mainapp/password-reset-complete.html'),
         name='password_reset_complete'),
    path('change-password/',
         PasswordChangeView.as_view(
             template_name='mainapp/change-password.html'),
         name='password_change'),
    path('change-password-done/',
         PasswordChangeDoneView.as_view(template_name='mainapp/index.html'),
         name='password_change_done'),
    url(r'^post/(?P<post_id>.+)/$', views.get_one_post, name='onepost'),

    # path('post/<int:post_id>/<int:parent_id>/', views.get_one_post, name='onepostcom'),
]
Beispiel #13
0
from django.contrib.auth.views import (
    LoginView, LogoutView,
    PasswordChangeView, PasswordChangeDoneView,
    PasswordResetView, PasswordResetDoneView,
    PasswordResetConfirmView, PasswordResetCompleteView
)
from django.urls import path

from accounts import views

urlpatterns = [
    path('signup/', views.signup, name='signup'),
    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(), 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'),
]
Beispiel #14
0
from main import settings
from . import views

urlpatterns = [
    # login view halaman 98
    # path('login/', views.user_login, name='loginUrl')
    path('', LoginView.as_view(), name='login'),
    path('keluar/', LogoutView.as_view(), name='keluarUrl'),
    path('dashboard/', views.dashboard, name='dashboardUrl'),
    # default template_name=password_change_form.html
    path('ganti_password/',
         PasswordChangeView.as_view(template_name='registration/ganti_password_form.html'),
         name='gantiPaswordUrl'),
    # default template_name=password_change_done.html
    path('ganti_password/selesai/',
         PasswordChangeDoneView.as_view(template_name='registration/ganti_password_selesai.html'),
         name='gantiPasswordSelesaiUrl'),
    path('password_reset/', PasswordResetView.as_view(), name='passwordResetUrl'),
    path('password_reset/done/', PasswordResetDoneView.as_view(), name='password_reset_done'),
    path('reset/<uidb64>/<token>/', PasswordResetConfirmView.as_view(), name='resetTokenUrl'),
    path('reset/done/', PasswordResetCompleteView.as_view(), name='resetDoneUrl'),
    path('daftar/', views.daftar, name='daftarUrl'),
    path('ubah/', views.ubah, name='ubahUrl'),
    path('users/', views.user_list, name='usersListUrl'),
    path('users/follow/', views.user_follow, name='userFollowUrl'),
    path('users/<uname>/', views.user_detail, name='userDetailUrl'),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Beispiel #15
0
from django.conf.urls import url
from .views import RegisterUserView

from django.urls import reverse_lazy
from django.contrib.auth.views import(
    LoginView,
    LogoutView,
    PasswordResetView,
    PasswordResetDoneView,
    PasswordChangeView,
    PasswordChangeDoneView,
    PasswordResetConfirmView,
    PasswordResetCompleteView
)

app_name = 'accounts'

urlpatterns = [
    url(r'^register/$', RegisterUserView.as_view(), name='register'),
    url(r'^login/$', LoginView.as_view(template_name='accounts/login.html'), name='login'),
    url(r'^logout/$', LogoutView.as_view(next_page=reverse_lazy('accounts:login')), name='logout'),
    url(r'^password-change/$', PasswordChangeView.as_view(template_name='accounts/password-change.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.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'^password-reset-confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$', PasswordResetConfirmView.as_view(template_name='accounts/password-reset-confirm.html'), name='password_reset_confirm'),
    url(r'^password-reset-complete/$', PasswordResetCompleteView.as_view(template_name='accounts/password-reset-complete.html'), name='password_reset_complete'),
]
Beispiel #16
0
from django.conf.urls import url
from . import views
from django.urls import path , re_path
from django.contrib.auth.views import PasswordChangeView , PasswordChangeDoneView

app_name = 'crm'
urlpatterns = [
    path('', views.home, name='home'),
    re_path(r'^home/$', views.home, name='home'),
    path("signup/", views.signup_view, name="signup"),

re_path ( r'^accounts/password/change/$' , PasswordChangeView.as_view ( ) , name="password_change" ) ,
re_path ( r'^accounts/password/change/done/$' , PasswordChangeDoneView.as_view () , name="password_change_done" ) ,

    path('customer_list', views.customer_list, name='customer_list'),
    path('customer/<int:pk>/edit/', views.customer_edit, name='customer_edit'),
    path('customer/<int:pk>/delete/', views.customer_delete, name='customer_delete'),
    path('customer/<int:pk>/summary/', views.summary, name='summary'),
    path('service_list', views.service_list, name='service_list'),
    path('service/create/', views.service_new, name='service_new'),
    path('service/<int:pk>/edit/', views.service_edit, name='service_edit'),
    path('service/<int:pk>/delete/', views.service_delete, name='service_delete'),
    path ( 'product_list' , views.product_list , name='product_list' ) ,
    path ( 'product/create/' , views.product_new , name='product_new' ) ,
    path('product/<int:pk>/edit/', views.product_edit, name='product_edit'),
    path('product/<int:pk>/delete/', views.product_delete, name='product_delete'),



]
Beispiel #17
0
from django.urls import path, include
from .views import UserCreateView, ProfileView, ProfileUpdateView, AuthorRequestView, MyPostsView
from django.contrib.auth.views import LoginView, PasswordResetView, PasswordResetDoneView, PasswordResetConfirmView, PasswordResetCompleteView, PasswordChangeView, PasswordChangeDoneView

urlpatterns = [
    path('signup', UserCreateView.as_view(), name='signup'),
    path('login/', LoginView.as_view(template_name="account/login.html"), name='login'),

    path('u/<slug:slug>', ProfileView.as_view(), name="profile-view"),
    path('u/<slug:slug>/update', ProfileUpdateView.as_view(), name="profile-update"),

    path('author-request', AuthorRequestView.as_view(), name="author-request"),
    path('my-posts', MyPostsView.as_view(), name="my-posts"),

    path('password-reset/', PasswordResetView.as_view(template_name="account/password_reset.html", email_template_name="account/password_reset_email.html"), name='password-reset'),
    path('password_reset/done/', PasswordResetDoneView.as_view(template_name="account/password_reset_done.html"), name='password-reset-done'),
    path('reset/<uidb64>/<token>/', PasswordResetConfirmView.as_view(template_name="account/password_reset_confirm.html"), name='password-reset-confirm'),
    path('reset/done/', PasswordResetCompleteView.as_view(template_name="account/password_reset_complete.html"), name='password-reset-complete'),

    path('password-change/', PasswordChangeView.as_view(template_name="account/password_change.html"), name='password-change'),
    path('password_change/done/', PasswordChangeDoneView.as_view(template_name="account/password_change_done.html"), name='password-change-done'),

    path('', include('django.contrib.auth.urls')),
]
Beispiel #18
0
)


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(
            template_name='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(
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'),
    url(r'^student-research/$', views.flatpage, {'url': '/student-research/'}, name='student-research'),
Beispiel #20
0
     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),
     name='password_reset_done'),
 url(r'^accounts/password_reset_confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',
     CustomPasswordResetView.as_view(
         template_name='login_and_password/password_reset_confirm.html',
         form_class=HQSetPasswordForm,
         extra_context={
                                        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"),
    path('invoicing-update/<int:pk>', InvoicingDetailsUpdateView.as_view(), name="invoicing-update"),
Beispiel #22
0
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'),
        name='password_reset_confirmation'),
    re_path(r'^password/reset/complete/$',
Beispiel #23
0
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'),
    path('managers/', ManagersWorkboard.as_view(),
         name='url_managers_workboard'),
Beispiel #24
0
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')
]
Beispiel #25
0
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')
]
Beispiel #26
0
      LoginView.as_view(template_name='mainapp/registro/login.html', ),
      name='sec-login'),
 path('accounts/profile/',
      views.paginaCandidatos,
      name='sec-paginaCandidatos'),
 path('logout/',
      LogoutView.as_view(next_page=reverse_lazy('sec-home'), ),
      name='sec-logout'),
 path('accounts/password_change/',
      PasswordChangeView.as_view(
          template_name='mainapp/registro/trocaSenha.html',
          success_url=reverse_lazy('sec-password_change_done'),
      ),
      name='sec-password_change'),
 path('accounts/password_change_done/',
      PasswordChangeDoneView.as_view(
          template_name='mainapp/registro/trocaFeita.html', ),
      name='sec-password_change_done'),
 path('accounts/terminaRegistro/<int:pk>/',
      UpdateView.as_view(
          template_name='mainapp/registro/paginaUsuario.html',
          success_url=reverse_lazy('sec-home'),
          model=User,
          fields=[
              'first_name',
              'last_name',
              'email',
          ],
      ),
      name='sec-completaDadosUsuario'),
 path('accounts/password_reset/',
      PasswordResetView.as_view(
Beispiel #27
0
	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()
# urlpatterns+= static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Beispiel #28
0
urlpatterns = [
    # Login, Logout, Register
    path('login/',
         LoginView.as_view(template_name='accounts/registration/login.html',
                           redirect_authenticated_user=True),
         name='login'),
    path('register/', UserCreateView.as_view(), name='register'),
    path('logout/', LogoutView.as_view(), name='logout'),
    # Password Change
    path('password/change/',
         PasswordChangeView.as_view(
             template_name='accounts/registration/password_change.html',
             success_url=reverse_lazy('users:password_change_done')),
         name='password_change'),
    path('password/change/done/',
         PasswordChangeDoneView.as_view(
             template_name='accounts/registration/password_change_done.html'),
         name='password_change_done'),
    # Password Reset
    path('password/reset/',
         PasswordResetView.as_view(
             template_name='accounts/registration/password_reset.html',
             email_template_name='registration/password_reset_email.html',
             subject_template_name='registration/password_reset_subject.html',
             success_url=reverse_lazy('users:password_reset_done')),
         name='password_reset'),
    path('password/reset/done/',
         PasswordResetDoneView.as_view(
             template_name='accounts/registration/password_reset_done.html'),
         name='password_reset_done'),
    path('reset/<uidb64>/<token>/',
         PasswordResetConfirmView.as_view(
Beispiel #29
0
        {'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
Beispiel #30
0
 path('signin/',
      LoginView.as_view(template_name='accounts/SignIn.html'),
      name='SignIn'),
 path('auth/', include('social_django.urls', namespace='social')),
 path('signout/',
      LogoutView.as_view(template_name='accounts/SignOut.html'),
      name='SignOut'),
 path('signup/', views.signup, name='SignUp'),
 path('profile/', views.view_profile, name='view_profile'),
 path('profile/edit/', views.edit_profile, name='edit_profile'),
 path('change/password/',
      PasswordChangeView.as_view(
          template_name='accounts/ChangePassword.html'),
      name='change_password'),
 path('change/password/done/',
      PasswordChangeDoneView.as_view(
          template_name='accounts/ResetPasswordConfirm.html'),
      name='password_change_done'),
 path('reset/password/',
      PasswordResetView.as_view(),
      {'template_name': 'accounts/ResetPassword.html'},
      name='password_reset'),
 path('reset/password/done/$',
      PasswordResetDoneView.as_view(),
      {'template_name': 'accounts/ResetPasswordSent.html'},
      name='password_reset_done'),
 path(
     'reset/rassword/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': 'accounts/ResetPasswordConfirm.html'},
     name='password_reset_confirm'),
 path('reset/password/complete/',
Beispiel #31
0
    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',
         PasswordResetCompleteView.as_view(template_name='registration/custom_password_reset_complete.html'),
         name='password_reset_complete'),
    PasswordChangeDoneView,
    PasswordResetConfirmView,
    PasswordResetCompleteView
)

urlpatterns = [
    path('signup/', views.signup, name='signup'),
    path('login/', LoginView.as_view(template_name='account/login.html'), name='login'),
    path('logout/', LogoutView.as_view(), name="logout"),
    path('change_password/', auth_views.PasswordChangeView.as_view(template_name='account/change_password.html'),
         name='password_change'),
    path('change_password/done/',
         auth_views.PasswordChangeDoneView.as_view(template_name='account/change_password_done.html'),
         name='password_change_done'),

    path('reset_password/', PasswordResetView.as_view(), name="reset_password"),
    path('reset_password_done/', PasswordChangeDoneView.as_view(), name="password_reset_done"),
    path('reset/<uidb64>/<token>/', PasswordResetConfirmView.as_view(), name="password_reset_confirm"),
    path('reset_password_complete/', PasswordResetCompleteView.as_view(), name="password_reset_complete"),
    path('active/<uidb64>/<token>', views.ActiveAccountView.as_view(), name='active'),
    # profile
    path('profile', views.profile, name='profile_page'),
    path('update_user_information/', views.update_user_information, name='update_user_information'),
    path('update_project/<int:project_id>/', views.update_project, name='update_project'),
    path('delete_project/<int:project_id>/', views.delete_project, name='delete_project'),
    path('update_donation/<int:donation_id>/', views.update_donation, name='update_donation'),
    path('delete_donation/<int:donation_id>/', views.delete_donation, name='delete_donation'),
    path('delete_account/', views.delete_account, name='delete_account'),
    path('update_user_avatar/<int:user_id>/', views.update_user_avatar, name='update_user_avatar')
]
Beispiel #33
0
from website.views import home

urlpatterns = [
    path("admin/", admin.site.urls),
    path("", home, name="home"),
    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"),
Beispiel #34
0
 path('dashboard/', dashboard, name='dashboard'),
 path('model_form_upload/', model_form_upload, name='model_form_upload'),
 path('update_item/<str:pk>/', updateitem, name="update_item"),
 path('delete_item/<str:pk>/', delete_item, name="delete_item"),
 path('',
      LoginView.as_view(template_name='registration/login.html'),
      name='login'),
 path('logout/',
      LogoutView.as_view(template_name='authapp/logged_out.html'),
      name='logout'),
 path('password_change/',
      PasswordChangeView.as_view(
          template_name='authapp/password_change_form.html'),
      name='password_change'),
 path('password_change/dond/',
      PasswordChangeDoneView.as_view(
          template_name='authapp/password_change_done.html'),
      name='password_change_done'),
 path('password_reset/',
      PasswordResetView.as_view(
          template_name='authapp/password_reset_form.html',
          email_template_name='authapp/password_reset_email.html',
          success_url=reverse_lazy('authapp:password_reset_done')),
      name='password_reset'),
 path('password_reset/done/',
      PasswordResetDoneView.as_view(
          template_name='authapp/password_reset_done.html'),
      name='password_reset_done'),
 path('reset/<uidb64>/<token>/',
      PasswordResetConfirmView.as_view(
          template_name='authapp/password_reset_confirm.html',
          success_url=reverse_lazy('authapp:login')),
Beispiel #35
0
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'),
    path('reset/<uidb64>/<token>/',
         PasswordResetConfirmView.as_view(
             template_name='users/password_reset_confirm.html',
             success_url=reverse_lazy('users:password_reset_complete')),
Beispiel #36
0
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)),
]