Example #1
0
 def test_form_valid(self):
     """
     Check if the new user object is created
     """
     view = RegisterView()
     form = RegisterForm()
     form.cleaned_data = {'username': '******', 'password': '******'}
     view.form_valid(form)
     self.assertTrue(User.objects.filter(username='******').exists())
Example #2
0
    def test_user_registration(self):
        request = self.factory.post(reverse('accounts:register'), {
            'email': '*****@*****.**',
            'password1': 'passwd',
            'password2': 'passwd'
        })
        # RequestFactory doesn't support middlewares, need fallback storage for messages
        setattr(request, 'session', 'session')
        messages = FallbackStorage(request)
        setattr(request, '_messages', messages)
        response = RegisterView.as_view()(request)

        user, created = AnalyticsUser.objects.get_or_create(email='*****@*****.**')
        self.assertEqual(created, False)
Example #3
0
from django.contrib import admin
from accounts.views import RegisterView
from django.urls import path

urlpatterns = [path('register/', RegisterView.as_view(), name='register')]
Example #4
0
    url(r'^addresses/$', AddressListView.as_view(), name='addresses'),
    url(r'^addresses/create/$', AddressCreateView.as_view(), name='address-create'),
    url(r'^addresses/(?P<pk>\d+)/$', AddressUpdateView.as_view(), name='address-update'),
    url(r'^analytics/sales/$', SalesView.as_view(), name='sales-analytics'),
    url(r'^analytics/sales/data/$', SalesAjaxView.as_view(), name='sales-analytics-data'),
    url(r'^contact/$', contact_page, name='contact'),
    url(r'^login/$', LoginView.as_view(), name='login'),
    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'),
    url(r'^register/guest/$', GuestRegisterView.as_view(), name='guest_register'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    url(r'^api/cart/$', cart_detail_api_view, name='api-cart'),
    url(r'^cart/', include("carts.urls", namespace='cart')),
    url(r'^billing/payment-method/$', payment_method_view, name='billing-payment-method'),
    url(r'^billing/payment-method/create/$', payment_method_createview, name='billing-payment-method-endpoint'),
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^bootstrap/$', TemplateView.as_view(template_name='bootstrap/example.html')),
    url(r'^library/$', LibraryView.as_view(), name='library'),
    url(r'^orders/', include("orders.urls", namespace='orders')),
    url(r'^products/', include("products.urls", namespace='products')),
    url(r'^search/', include("search.urls", namespace='search')),
    url(r'^settings/$', RedirectView.as_view(url='/account')),
    url(r'^settings/email/$', MarketingPreferenceUpdateView.as_view(), name='marketing-pref'),
    url(r'^webhooks/mailchimp/$', MailchimpWebhookView.as_view(), name='webhooks-mailchimp'),
    url(r'^admin/', admin.site.urls),
]


if settings.DEBUG:
    urlpatterns = urlpatterns + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns = urlpatterns + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Example #5
0
    '',
    url(r'login/$', custom_login, {'template_name': 'accounts/login.html'},
        name='login'),
    url(r'logout/$', custom_logout, name='logout'),
    url(r'password_reset/$', 'django.contrib.auth.views.password_reset',
        {'from_email': settings.EMAIL_HOST_USER,
         'template_name': 'accounts/password_reset_form.html',
         'subject_template_name': 'accounts/email/password_reset_subject.txt'},
        name='password_reset'),
    url(r'password_reset/done/$',
        'django.contrib.auth.views.password_reset_done',
        {'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})/$',
        'django.contrib.auth.views.password_reset_confirm',
        {'template_name': 'accounts/password_reset_confirm.html',},
        name="password_reset_confirm"),
    url(r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete',
        {'template_name': 'accounts/password_reset_complete.html'},
        name='password_reset_complete'),
    url(r'^password_change/$', 'django.contrib.auth.views.password_change',
        {'template_name': 'accounts/password_change_form.html'},
        name='password_change'),
    url(r'^password_change/done/$',
        'django.contrib.auth.views.password_change_done',
        {'template_name': 'accounts/password_change_done.html'},
        name='password_change_done'),
    url(r'register/$', RegisterView.as_view(), name='user-register'),
    url(r'update/$', ProfileUpdateView.as_view(), name='user-update'),
)
Example #6
0
from django.conf.urls import patterns, url

from accounts.views import LoginView, RegisterView, LogoutView

urlpatterns = patterns('',

    url(
        regex=r'^login',
        view=LoginView.as_view(),
        name='login'
    ),
    url(
        regex=r'^logout',
        view=LogoutView.as_view(),
        name='logout'
    ),
    url(
        regex=r'^register',
        view=RegisterView.as_view(),
        name='register'
    ),

)
Example #7
0
Including another URLconf
    1. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
from accounts.views import logout_page, RegisterView
from kaizen.views import CategoryCreateView, CategoryListView, MySuggestionsView, SuggestionView, SuggestionDeleteView, SuggestionCreateView, SuggestionListView, SuggestionUpdateView

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', SuggestionListView.as_view(), name="suggestion-list"),
    url(r'^comments/', include('django_comments.urls')),
    url(r'^accounts/logout/', logout_page, name="logout"),
    url(r'^accounts/register/',
        RegisterView.as_view(),
        name="registration_register"),
    url(r'^accounts/',
        include('registration.backends.simple.urls', namespace="accounts")),
    url(r'^kaizen/categories/$',
        CategoryListView.as_view(),
        name="category-list"),
    url(r'^kaizen/categories/add/$',
        CategoryCreateView.as_view(),
        name="category-add"),
    url(r'^kaizen/my/', MySuggestionsView.as_view(), name="my-suggestions"),
    url(r'^kaizen/add/', SuggestionCreateView.as_view(),
        name="suggestion-add"),
    url(r'^kaizen/(?P<pk>\d+)/$',
        SuggestionView.as_view(),
        name="suggestion-detail"),
Example #8
0
    url(r'^checkout/address/reuse/$',
        checkout_address_reuse_view,
        name='checkout_address_reuse'),
    url(r'^register/guest/$',
        GuestRegisterView.as_view(),
        name='guest_register'),
    url(r'^logout/$', LogoutView.as_view(), name='logout'),
    url(r'^api/cart/$', cart_detail_api_view, name='api-cart'),
    url(r'^cart/', include("carts.urls", namespace='cart')),
    url(r'^billing/payment-method/$',
        payment_method_view,
        name='billing-payment-method'),
    url(r'^billing/payment-method/create/$',
        payment_method_createview,
        name='billing-payment-method-endpoint'),
    url(r'^register/$', RegisterView.as_view(), name='register'),
    url(r'^bootstrap/$',
        TemplateView.as_view(template_name='bootstrap/example.html')),
    url(r'^library/$', LibraryView.as_view(), name='library'),
    url(r'^orders/', include("orders.urls", namespace='orders')),
    url(r'^products/', include("products.urls", namespace='products')),
    url(r'^search/', include("search.urls", namespace='search')),
    url(r'^settings/$', RedirectView.as_view(url='/account')),
    url(r'^settings/email/$',
        MarketingPreferenceUpdateView.as_view(),
        name='marketing-pref'),
    url(r'^webhooks/mailchimp/$',
        MailchimpWebhookView.as_view(),
        name='webhooks-mailchimp'),
    url(r'^admin/', admin.site.urls),
]
Example #9
0
from django.urls import path, reverse_lazy

from allauth.account.views import login, logout

from accounts.views import (
    UserDetail,
    UserProfileUpdate,
    RegisterView,
    # CreateUserProfile,
)

app_name = 'accounts'

urlpatterns = [
    path('login/', login, name='login'),
    path('logout/', logout, name='logout'),
    path('registration/',
         RegisterView.as_view(
             template_name='pages/user-profile/registration.html',
             success_url=reverse_lazy('p_library:home'),
         ),
         name='registration'),
    # path('profile-create/', CreateUserProfile.as_view(), name='profile-create'),
    path('user/<int:pk>/', UserDetail.as_view(), name='user_profile'),
    path('user/update/', UserProfileUpdate.as_view(), name='user_update'),
]
Example #10
0
from django.urls import path
from knox import views as knox_views
from accounts.views import RegisterView
from accounts.views import LoginView
from accounts.views import UserView

urlpatterns = [
    path('api/auth/register', RegisterView.as_view()),
    path('api/auth/login', LoginView.as_view()),
    path('api/auth/user', UserView.as_view()),
    path('api/auth/logout',
         knox_views.LogoutView.as_view(),
         name='knox_logout'),
]
Example #11
0
"""
from django.contrib import admin
from django.urls import path
from api.router import router
from django.conf.urls import url, include
from accounts.views import RegisterView
from .views import WelcomeView
from rest_framework_simplejwt import views as jwt_views

urlpatterns = [
    path('admin/', admin.site.urls),
    url(r'^api-auth/', include('rest_framework.urls')),
    path('api/', include(router.urls)),

    #routes for login and register
    path('register/', RegisterView.as_view()),
    path('', WelcomeView.as_view()),
    path('', include('django.contrib.auth.urls')),
    path('api/token/',
         jwt_views.TokenObtainPairView.as_view(),
         name='token_obtain_pair'),
    path('api/token/refresh/',
         jwt_views.TokenRefreshView.as_view(),
         name='token_refresh'),

    #accounts apps routes
    path("accounts/", include('accounts.urls')),
    path("perimeters/", include('perimeters.urls')),
    path("floors/", include('floors.urls')),
    path("checkpoints/", include('checkpoint.urls')),
    path("patrol/", include('patrol.urls')),
Example #12
0
urlpatterns = [
    path('admin/', admin.site.urls),
    # path('home/', home_page, name="Home"),
    path('accounts/', include("accounts.urls", namespace="accounts")),
    path('home/', include("products.urls", namespace="products"), name="Home"),
    path('about/', about_page, name="About"),
    path('contact/', contact_page, name="Contact"),
    path('login/', LoginView.as_view(), name="Login"),
    path('checkout/address/create/',
         checkout_address_create_view,
         name='checkout_address_create'),
    path('checkout/address/reuse/',
         checkout_address_reuse_view,
         name='checkout_address_reuse'),
    path('register/guest/', guest_register_view, name="Guest_register"),
    path('logout/', LogoutView.as_view(), name="Logout"),
    path('api/cart/', cart_detail_api_view, name="api-cart"),
    path('cart/', include("carts.urls", namespace="cart")),
    path('register/', RegisterView.as_view(), name="Register"),
    # path('billing/payment-method/', payment_method_view, name="billing-payment-method"),
    path('bootsrap/',
         TemplateView.as_view(template_name="bootsrap/example.html")),
    path('search/', include("search.urls", namespace="search")),
    path('products/', include("products.urls", namespace="products"))
]
if settings.DEBUG:
    urlpatterns = urlpatterns + static(settings.STATIC_URL,
                                       document_root=settings.STATIC_ROOT)
    urlpatterns = urlpatterns + static(settings.MEDIA_URL,
                                       document_root=settings.MEDIA_ROOT)
Example #13
0
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.urls import path, include
from accounts.views import (
    RegisterView,
    LoginAPI,
    ChangePassswordView,
)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/user-register/', RegisterView.as_view(), name='register'),
    path('api/user-login/', LoginAPI.as_view(), name='login'),
    path('api/user-change-password/',
         ChangePassswordView.as_view(),
         name='changepassword'),
    path('api/password_reset/',
         include('django_rest_passwordreset.urls',
                 namespace='password_reset')),
]
Example #14
0
from django.urls import path
from django.contrib.auth.views import LoginView, LogoutView, PasswordChangeView, PasswordChangeDoneView

# from accounts.views import login_view, logout_view
from accounts.views import RegisterView, UserDetailView, UserChangeView, UserPasswordChangeView

app_name = 'accounts'

urlpatterns = [
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('sign-up/', RegisterView.as_view(), name='sign_up'),
    path('<int:pk>/', UserDetailView.as_view(), name='detail'),
    path('<int:pk>/update/', UserChangeView.as_view(), name='change'),
    path('<int:pk>/password_change/', UserPasswordChangeView.as_view(), name='password_change'),
]
Example #15
0
from django.conf.urls import url

from accounts.views import RegisterView, LoginView, UserAPI

from rest_framework import routers

router = routers.DefaultRouter()
router.register(r'users', UserAPI, base_name='users')

urlpatterns = [
    url(r'^auth/registration/', RegisterView.as_view(), name='register'),
    url(r'^auth/login/', LoginView.as_view(), name='login'),
]

urlpatterns += router.urls
Example #16
0
from django.contrib.auth.views import LoginView, LogoutView
from django.urls import path, include

from accounts.views import RegisterView, UserDetailView, UserUpdateView, UserPasswordChangeView

app_name = 'accounts'

urlpatterns = [
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('registration/', RegisterView.as_view(), name='registration'),
    path('<int:pk>/', UserDetailView.as_view(), name='detail'),
    path('profile/', UserUpdateView.as_view(), name='update_profile'),
    path('change_password/',
         UserPasswordChangeView.as_view(),
         name='change_password'),
]
Example #17
0
    path('accounts/login/', RedirectView.as_view(url='/login')),
    path('account/login/', RedirectView.as_view(url='/login')),
    path('accounts/', RedirectView.as_view(url='/account')),
    path('accounts/', include('accounts.passwords.urls')),
    path('account/', include('accounts.urls')),
    path('admin/', admin.site.urls),
    path('api/cart/', cart_detail_api_view, name='api_cart'),
    path('billing/payment-method/', payment_method_view, name='billing-payment-method'),
    path('billing/payment-method/create/', payment_method_create_view,
         name='billing-payment-method-endpoint'),
    path('cart/', include('carts.urls')),
    path('checkout/address/create/', checkout_address_create_view, name='checkout_address_create'),
    path('checkout/address/reuse/', checkout_address_reuse_view, name='checkout_address_reuse'),
    path('checkout/payment-option/', payment_option_select, name='billing-payment-option-select'),
    path('contact/', contact_page, name='contact'),
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('orders/', include('orders.urls')),
    path('products/', include('products.urls')),
    path('register/', RegisterView.as_view(), name='register'),
    path('register/guest/', GuestRegisterView.as_view(), name='guest_register'),
    path('search/', include('search.urls')),
    path('settings/', RedirectView.as_view(url='/account')),
    path('settings/email/', MarketingPreferenceUpdateView.as_view(), name='marketing-pref'),
    path('webhooks/mailchimp/', MailchimpWebhookView.as_view(), name='webhooks-mailchimp'),
]

if settings.DEBUG:
    urlpatterns = urlpatterns + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns = urlpatterns + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Example #18
0
    url(r'^accounts/password/change/done/$',
        PasswordChangeDoneView.as_view(),
        name='password_change_done'),

    #*****************************************************

    #***************************************************** Account Profile
    url(r'^accounts/profile/$',
        UserProfileUpdateView.as_view(),
        name='user_profile'),
    url(r'^accounts/profile/(?P<email>.*)/', UserProfileUpdateView.as_view()),

    #*****************************************************

    #***************************************************** Account Activation
    url(r'^accounts/register/$', RegisterView.as_view(), name="register"),
    url(r'^accounts/activation-sent/$',
        UserAccount_VerificationSent.as_view(),
        name='account_activation_sent'),
    #
    url(r'^accounts/activate/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
        activate,
        name='activate'),

    # *****************************************************
    url(r'^admin/', include(admin.site.urls)),  # NOQA
    url(r'^oauth2/', include(
        'social_django.urls',
        namespace='social')),  # OAuth, should be placed prior to cms urls
    url(r'^', include('cms.urls')),
) + staticfiles_urlpatterns()
from django.views.generic import TemplateView
from carts.views import cart_home
from accounts.views import LoginView, guest_register_view, RegisterView
from django.contrib.auth.views import LogoutView
from adresses.views import checkout_address_create_view, checkout_address_reuse_view
from carts.views import cart_detail_api_view
from billing.views import payment_method_view, payment_method_createview
from marketing.views import MarketingPreferenceUpdateView, MailchimpWebHookView

urlpatterns = [
    path(r"", home_page, name="home"),
    path(r"about/", about_page, name="about"),
    path(r"contact/", contact_page, name="contact"),
    path(r"login/", LoginView.as_view(), name="login"),
    path(r"logout/", LogoutView.as_view(), name="logout"),
    path(r"register/", RegisterView.as_view(), name="register"),
    path("bootstrap",
         TemplateView.as_view(template_name="bootstrap/example.html")),
    path("products/", include("products.urls", namespace="products")),
    re_path(r"api/cart/$", cart_detail_api_view, name="api-cart"),
    path("cart/", include("carts.urls", namespace="carts")),
    path("billing/payment-method",
         payment_method_view,
         name="billing-payment-method"),
    path("billing/payment-method/create/",
         payment_method_createview,
         name='billing-payment-method-endpoint'),
    path("search/", include("search.urls", namespace="search")),
    path("register/guest/", guest_register_view, name="guest_register"),
    path("checkout/address/create",
         checkout_address_create_view,
Example #20
0
    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. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
from accounts.views import logout_page, RegisterView
from kaizen.views import CategoryCreateView, CategoryListView, MySuggestionsView, SuggestionView, SuggestionDeleteView, SuggestionCreateView, SuggestionListView, SuggestionUpdateView

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', SuggestionListView.as_view(), name="suggestion-list"),
    url(r'^comments/', include('django_comments.urls')),
    url(r'^accounts/logout/', logout_page, name="logout"),
    url(r'^accounts/register/', RegisterView.as_view(), name="registration_register"),
    url(r'^accounts/', include('registration.backends.simple.urls', namespace="accounts")),
    url(r'^kaizen/categories/$', CategoryListView.as_view(), name="category-list"),
    url(r'^kaizen/categories/add/$', CategoryCreateView.as_view(), name="category-add"),
    url(r'^kaizen/my/', MySuggestionsView.as_view(), name="my-suggestions"),
    url(r'^kaizen/add/', SuggestionCreateView.as_view(), name="suggestion-add"),
    url(r'^kaizen/(?P<pk>\d+)/$', SuggestionView.as_view(), name="suggestion-detail"),
    url(r'^kaizen/(?P<pk>\d+)/edit/', SuggestionUpdateView.as_view(), name="suggestion-update"),
    url(r'^kaizen/(?P<pk>\d+)/delete/', SuggestionDeleteView.as_view(), name="suggestion-delete"),
    url(r'^$', TemplateView.as_view(template_name="base.html"), name="homepage"),
]
Example #21
0
from django.urls import path

from accounts.views import RegisterView

app_name='accounts'

urlpatterns=[
    path('register/', RegisterView.as_view(), name='register'),
]
Example #22
0
        title='RADAR API',
        default_version='v1',
        description='Test description',
        term_of_service="https//radar.com",
        contact=openapi.Contact(email='*****@*****.**'),
        license=openapi.License(name='Test License'),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

urlpatterns = [
    path(
        '',
        schema_view.with_ui('swagger', cache_timeout=0),
        name='schema-swagger-ui',
    ),
    path(
        'redoc/',
        schema_view.with_ui('redoc', cache_timeout=0),
        name='schema-redoc',
    ),
    path('admin/', admin.site.urls),
    path('api-auth/', include('rest_framework.urls')),
    path('verification/', include('verify_email.urls')),
    path('api/user-accounts/', RegisterView.as_view(), name='register'),
    path('api/user-login/', LoginAPIView.as_view(), name='login'),
    path('api/user-logout/', LogoutAPIView.as_view(), name='logout'),
    path('api/email-verify', verifyEmail.as_view(), name='email-verify'),
]
Example #23
0
from django.conf.urls import url, patterns
from accounts.views import RegisterView, ProfileView, LoginView, LogoutView,RegisterSuccessView,EditProfileView,FollowUser

urlpatterns=patterns('',
    url(r'^register/$',RegisterView.as_view(),name="register"),
    url(r'^registersuccess/$',RegisterSuccessView.as_view(),name="register_success"),
    url(r'^login/$',LoginView.as_view(), name="login"),
    url(r'^logout/$', LogoutView.as_view(), name="logout"),
    url(r'^profile/(?P<username>[-\w\d]+)/$',ProfileView.as_view(),name="profile"),
    url(r'^profile/$',ProfileView.as_view(),name="myprofile"),
    url(r'^changepassword/$',ProfileView.as_view(),name="change_password"),
    url(r'^editprofile/$',EditProfileView.as_view(),name="edit_profile"),
    url(r'^follow/$',FollowUser.as_view())
)
Example #24
0
                            EmailConfirmation, LogoutView, UserProfileView,
                            ProfileEditView, UserHistoryView, UserAdressesView,
                            ChangePasswordView, AddressEditView,
                            UserAdressAddView)
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
    path('admin/', admin.site.urls),
    path('', HomeView.as_view(), name='home'),
    path('product/<subcategory>/', ListView.as_view(), name='subcategory'),
    path('product/<subcategory>/<int:id>', DetailView.as_view(),
         name='detail'),
    path('cart/', include('cart.urls')),
    path('about/', AboutView.as_view(), name='about'),
    path('contact/', ContactView.as_view(), name='contact'),
    path('accounts/register/', RegisterView.as_view(), name='register'),
    path('accounts/login/', LoginView.as_view(), name='login'),
    path('accounts/reset-password/',
         PassordResetView.as_view(),
         name='reset-password'),
    path('accounts/register/email-confirmation',
         EmailConfirmation.as_view(),
         name='email_confirmation'),
    path('accounts/logout/', LogoutView.as_view(), name='logout'),
    path('accounts/<username>/', UserProfileView.as_view(), name='profile'),
    path('accounts/<username>/edit',
         ProfileEditView.as_view(),
         name='profile-edit'),
    path('accounts/<username>/history',
         UserHistoryView.as_view(),
         name='history'),
Example #25
0
from django.conf.urls import patterns, url

from accounts.views import LoginView, LogoutView, RegisterView, ForgotPasswordView, PasswordResetView, ChangePasswordView

urlpatterns = patterns(
    '',
    url(r'^login/$', LoginView.as_view(), name='accounts_login'),
    url(r'^logout/$', LogoutView.as_view(), name='accounts_logout'),
    url(r'^register/$', RegisterView.as_view(), name='accounts_register'),
    url(r'^forgot_password/$', ForgotPasswordView.as_view(), name='accounts_forgot_password'),
    url(r'^change_password/$', ChangePasswordView.as_view(), name='accounts_change_password'),
    url(r'^password_reset/(?P<user_id>\d+)-(?P<reset_code>\w+)/$',
        PasswordResetView.as_view(), name='accounts_password_reset'),
)
Example #26
0
                             ProductDetailView,
                             ProductDetailSlugView, 
                             Product_detail_view,
                             ProductFeaturedListView,
                             ProductFeaturedDetailView,
                            ) """
urlpatterns = [
    url(r'^$', home_page, name="home"),
    url(r'^about/$', about_page, name="about"),
    url(r'^contact/$', contact_page, name="contact"),
    #url(r'^login/$', login_page, name="login"),
    url(r'^login/$', LoginView.as_view(), name="login"),
    url(r'^logout/$', LogoutView.as_view(), name="logout"),
    url(r'^api/cart/$', cart_detail_api_view, name="api-cart"),
    #url(r'^register/$', register_page, name="register"),
    url(r'^register/$', RegisterView.as_view(), name="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"),
    url(r'^register/guest/$', guest_register_view, name="guest_register"),
    url(r'^bootstrap/$',
        TemplateView.as_view(template_name="bootstrap/justExample.html")),
    url(r'^products/',
        include(("products.urls", 'products'), namespace='products')),
    url(r'^cart/', include(("carts.urls", 'cart'), namespace='cart')),
    url(r'^billing/payment-method/$',
        payment_method_view,
        name="billing-payment-method"),
Example #27
0
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. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""


from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

from accounts.views import HomeView, LogoutPageView, RegisterView, RegisterSuccessView

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', 'django.contrib.auth.views.login'),
    url(r'^logout/$', LogoutPageView.as_view()),
    url(r'^register/$', RegisterView.as_view()),
    url(r'^register/success/$', RegisterSuccessView.as_view()),
    url(r'^home/$', HomeView.as_view()),
    url(r'^ckeditor/', include('ckeditor.urls')),


]

urlpatterns += staticfiles_urlpatterns()
Example #28
0
from django.conf.urls import patterns, url

from accounts.views import (
    LoginView,
    RegisterView,
    WebsiteListView,
    LogoutView,
    AddWebsiteView,
    WebsiteCreatedView,
    AccountSettingsView,
    EditWebsiteView,
)

urlpatterns = patterns(
    "",
    url(r"^login/$", LoginView.as_view(), name="login"),
    url(r"^logout/$", LogoutView.as_view(), name="logout"),
    url(r"^account/$", AccountSettingsView.as_view(), name="settings"),
    url(r"^created/$", WebsiteCreatedView.as_view(), name="website_created"),
    url(r"^register/$", RegisterView.as_view(), name="register"),
    url(r"^websites/$", WebsiteListView.as_view(), name="website_list"),
    url(r"^addwebsite/$", AddWebsiteView.as_view(), name="add_website"),
    url(r"^editwebsite/(?P<website_id>\d)/$", EditWebsiteView.as_view(), name="edit_website"),
    url(r"^signup/$", RegisterView.as_view(), name="signup"),
)
Example #29
0
from django.urls import path, include
from django.contrib.auth.views import LoginView
from accounts.views import RegisterView, UserDetailView, UserListView, UserChangeView, UserPasswordChangeView, \
    BasketClearLogoutView

app_name = 'accounts'

urlpatterns = [
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', BasketClearLogoutView.as_view(), name='logout'),
    path('register/', RegisterView.as_view(), name='create'),
    path('list/', UserListView.as_view(), name='list'),
    path(
        '<int:pk>/',
        include([
            path('', UserDetailView.as_view(), name='detail'),
            path('update/', UserChangeView.as_view(), name='change'),
            path('password_change/',
                 UserPasswordChangeView.as_view(),
                 name='password_change'),
        ])),
]
Example #30
0
from django.contrib.auth.views import LoginView
from django.urls import path
from accounts.views import logout_view, RegisterView

app_name = 'accounts'

urlpatterns = [
    path('accounts/login', LoginView.as_view(), name='login'),
    path('accounts/logout/', logout_view, name='logout'),
    path('accounts/registration/', RegisterView.as_view(), name='registration'),

]