Example #1
0
    if settings.ALLOW_REGISTRATION:
        urlpatterns += patterns('',
                url(r'^accounts/activate/complete/$',
                    TemplateView.as_view(template_name='registration/activation_complete.html'),
                    name='registration_activation_complete'),

                # Activation keys get matched by \w+ instead of the more specific
                # [a-fA-F0-9]{40} because a bad activation key should still get to the view;
                # that way it can return a sensible "invalid key" message instead of a
                # confusing 404.
                url(r'^accounts/activate/(?P<activation_key>\w+)/$',
                    ActivationView.as_view(),
                    name='registration_activate'),
                url(r'^accounts/register/$',
                    RegistrationView.as_view(),
                    {'backend': 'accounts.backend.Backend'},
                    name='registration_register'),
                url(r'^accounts/register/complete/$',
                    TemplateView.as_view(template_name='registration/registration_complete.html'),
                    name='registration_complete'),
                url(r'^accounts/register/closed/$',
                    TemplateView.as_view(template_name='registration/registration_closed.html'),
                    name='registration_disallowed'),
                url(r'^accounts/register/after-first-login/$',
                    accounts.views.AfterFirstLoginView.as_view(),
                    name='after_first_login'),
                )


from django.contrib.auth import views
from accounts.views import RegistrationView

from .views import login

urlpatterns = patterns('accounts.views',
    url(r'^login/$', login, name='login'),
    url(r'^logout/$', logout_then_login, name='logout'),
)

# Password reset
urlpatterns += patterns('django.contrib.auth.views',
    url(r'^account/password_reset/$', 'password_reset', name='password_reset',
        kwargs={'password_reset_form': PasswordResetForm}),
    url(r'^account/password_reset/done/$', 'password_reset_done', name='password_reset_done',),
    url(r'^account/reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
        'password_reset_confirm', name='password_reset_confirm', kwargs={'set_password_form': SetPasswordForm}),
    url(r'^account/reset/done/$', 'password_reset_complete', name='password_reset_complete'),


    url(r'^register/$', RegistrationView.as_view(), name='register'),
    url(r'^register/done/$', views.password_reset_done, {'template_name': 'registration/initial_done.html', }, name='register-done'),

    url(r'^register/password/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', views.password_reset_confirm, {
                                'template_name': 'registration/initial_confirm.html',
                                'post_reset_redirect': 'login',
                            }, name='register-confirm'),
    url(r'^register/complete/$', views.password_reset_complete, {'template_name': 'registration/initial_complete.html', }, name='register-complete'),
)
Example #3
0
.. module:: shweb.accounts
   :platform: Unix, Windows
   :synopsis: Module with url patters for accounts application.

"""

from django.conf.urls import patterns, url

from accounts.views import (
    RegistrationView,
    AccountConfirmation,
)


urlpatterns = patterns('',
    url(r"^signup/$", RegistrationView.as_view(), name="signup"),
    url(r"^confirm/(?P<code>[A-Za-z0-9_\-]+)/$", AccountConfirmation.as_view(),
        name="confirm"),
    url(r"^password/reset/$", 'django.contrib.auth.views.password_reset',
        {'template_name': 'registration/password_reset_form.html',
         'post_reset_redirect': 'accounts:password_reset_done'}, name="password_reset"),
    url(r"^password/reset/done/$", 'accounts.views.password_reset_done',
        name="password_reset_done"),
    url(r"^password/reset/complete/$", 'accounts.views.password_reset_complete',
        name="password_reset_complete"),
    url(r"^password/reset/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$",
        'django.contrib.auth.views.password_reset_confirm',
        {'post_reset_redirect': 'accounts:password_reset_complete'},
        name="password_reset_confirm"),
)
Example #4
0
from django.conf.urls import patterns, url
from django.contrib.auth.decorators import login_required
from accounts.views import LoginView, LogoutView, RegistrationView, AboutView, Profile


urlpatterns = [
    url(r'^signup/$', RegistrationView.as_view(),name='signup'),
    url(r'^login/$', LoginView.as_view(),name='login'),
    url(r'^logout/$', LogoutView.as_view(),name='logout'),
    url(r'^profile/$', Profile.as_view(),name='profile'),
    url(r'^about/$', AboutView.as_view(),name='about')
]
Example #5
0
         context_object_name='example_itineraries'
     ),
     name="itineraryexamples"
 ),
 url(r'^legal$',
     StaticPageView.as_view(template_name="legal"), name="legal"
 ),
 url(r'^printpreview/(?P<pk>\d+)$',
     personalize.PrintPreview.as_view(),
     name="printpreview"
 ),
 url(r'^sitedetails/(?P<pk>\d+)$',
     SiteDetailVeiw.as_view(), name='sitedetails'
 ),
 url(r'^sites$', SiteView.as_view(), name="sites"),
 url(r'^registration$', RegistrationView.as_view(), name="registration"),
 url(r'^confirm_registration/(?P<id>\w+)/(?P<confirmation_hash>\w+)$',
     RegistrationConfirmView.as_view(), name="confirmregistration"
 ),
 url(r'^login$', LoginView.as_view(), name="login"),
 url(r'^logout$', LogoutView.as_view(), name="logout"),
 url(r'^reset_password$',
     ResetPasswordView.as_view(), name="resetpassword"
 ),
 url(r'^password/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
     password_reset_confirm, {
         'template_name': 'password_reset_confirm.html',
         'post_reset_redirect': '/'
     },
     name='passwordresetconfirm'
 ),
Example #6
0
# coding: utf-8
from django.conf.urls import patterns, url
from django.contrib.auth import views
from django.contrib.auth.decorators import login_required, user_passes_test

from accounts.views import (
    RegistrationView,
    LoginView,
    LogOut,
    ProfileView,
    ProfileSettingsView,
    ProfileAccessView,
    ProfileModelsListView,
)


urlpatterns = patterns(
    u"accounts.views",
    url(r"^register/$", RegistrationView.as_view(), name=u"registration"),
    url(r"^login/$", LoginView.as_view(), name=u"login"),
    url(r"^logout/$", LogOut.as_view(), name=u"logout"),
    url(r"^profile/$", login_required(ProfileView.as_view()), name=u"profile"),
    url(r"^profile/settings/$", login_required(ProfileSettingsView.as_view()), name=u"profile_settings"),
    url(r"^profile/access/$", login_required(ProfileAccessView.as_view()), name=u"profile_access"),
    url(r"^profile/models_list/$", login_required(ProfileModelsListView.as_view()), name=u"profile_models_list"),
)
Example #7
0
from django.conf.urls import patterns, url
from accounts.views import LoginView, LogoutView, RegistrationView

urlpatterns = patterns('',
                       url(r'^users/sign_in$', LoginView.as_view(),
                           name='accounts.views.login'),
                       url(r'^users/sign_out$', LogoutView.as_view(),
                           name='accounts.views.logout'),
                       url(r'^registration/new$', RegistrationView.as_view(),
                           name='accounts.views.registration'),
                       )
Example #8
0
    1. Add an import:  from other_app.views import Home
    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.urls import url, include
from django.conf.urls.static import static
from django.contrib import admin
from django.conf import settings

from accounts.views import RegistrationView
from accounts.forms import RegistrationForm


urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^summernote/', include('django_summernote.urls')),
    url(r'^accounts/', include('accounts.urls')),
    url(r'^accounts/register/$',
        RegistrationView.as_view(
            form_class=RegistrationForm
        ), name='registration_register'),
    url(r'^accounts/', include('registration.backends.hmac.urls')),
    url(r'^', include('board.urls')),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Example #9
0
from django.contrib import admin
from django.urls import path, include
from django.contrib.auth import views as auth_views

from accounts import views
from accounts.views import RegistrationView, ProfileView

urlpatterns = [
    path('admin/', admin.site.urls),    
    path('' , include('askwe.urls')),    
    path('register/', RegistrationView.as_view(), name='register'),
    path('profile/', ProfileView.as_view(), name='profile'),
    path('accounts/login/', auth_views.LoginView.as_view(), name='login'),
    path('accounts/logout/', auth_views.LogoutView.as_view(), name='logout'),

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

    path('password_reset/', auth_views.PasswordResetView.as_view(), name='password_reset'),
    path('password_reset/done/', auth_views.PasswordResetDoneView.as_view(), name='password_reset_done'),
    path('reset/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
    path('reset/done/', auth_views.PasswordResetCompleteView.as_view(), name='password_reset_complete'),
]
Example #10
0
"""django_todo_project URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Add an import:  from blog import urls as blog_urls
    2. Import the include() function: from django.conf.urls import url, include
    3. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import url
from django.contrib import admin
from rest_framework_jwt.views import obtain_jwt_token
from todo.views import TodoView
from accounts.views import RegistrationView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^todo/$', TodoView.as_view()),
    url(r'^todo/(?P<pk>[0-9]+)/$', TodoView.as_view()),
    url(r'^accounts/register/$', RegistrationView.as_view()),
    url(r'^accounts/api-token-auth/$', obtain_jwt_token)
]
Example #11
0
from django.urls import path
from rest_framework_simplejwt.views import TokenRefreshView

from accounts.views import LoginView, RegistrationView, UserActivityView

urlpatterns = [
    path('auth/login/', LoginView.as_view(), name='user-login'),
    path('auth/register/', RegistrationView.as_view(), name='user-register'),
    path('auth/refresh-token/', TokenRefreshView.as_view(), name='token-refresh'),
    path('user-activity/<pk>/', UserActivityView.as_view(), name='user-activity'),

]
Example #12
0
"""yourblog URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    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.contrib import admin
from django.conf.urls import url, include
from blog.views import index
from accounts.views import RegistrationView, LoginView, logout_view, PostOfUserView

urlpatterns = [
    url('^$', index),
    url('admin/', admin.site.urls),
    url(r'^api-auth/', include('rest_framework.urls')),
    url('blog/', include('blog.urls')),
    url('register', RegistrationView.as_view(), name='register'),
    url('login', LoginView.as_view(), name='login'),
    url('logout', logout_view, name='logout'),
    url(r'(?P<pk>\d+)/myposts', PostOfUserView.as_view(), name='user-posts')
]
Example #13
0
#from products.views import (ProductListView,
#ProductDetailView,
#product_detail_view,
#product_list_view,
#ProductFeaturedListView,
#ProductDetailSlugView,
#ProductFeaturedDetailView)

urlpatterns = [
    url(r'^$', home_page, name='home'),
    url(r'^about/$', about_page, name='about'),
    # url(r'^account/login/$',RedirectView.as_view(url='/login')),
    url(r'^accounts/$', RedirectView.as_view(url='/account')),
    url(r'^settings/$', RedirectView.as_view(url='/account')),
    url(r'^contact/$', contact_page, name='contact'),
    url(r'^register/$', RegistrationView.as_view(), name='register'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    url(r'^login/$', LoginView.as_view(), name='login'),
    url(r'^api/cart/$', cart_detail_api_view, name='api-cart'),
    url(r'^billing/payment-method/$',
        payment_method_view,
        name='billing-payment-method'),
    url(r'^register/guest/$',
        GuestRegisterView.as_view(),
        name='guest_register'),
    url(r'^checkout/address/create/$',
        checkout_address_create_view,
        name='checkout_address_create'),
    url(r'^checkout/address/reuse/$',
        checkout_address_reuse_view,
        name='checkout_address_reuse'),