from django.conf.urls import url, include
from django.contrib.auth import urls as auth_urls
from account.views import SignUp, LogIn

urlpatterns = [
    url(r'^login/$', LogIn.as_view(), name='login'),
    url(r'^sign-up/$', SignUp.as_view(), name='signup'),
    url(r'^', include(auth_urls)),
]
Пример #2
0
from account import views
from account.views import ChangePassword, MyProfile, SignUp, UserListView, UserReadUpdateDeleteView

from django.contrib.auth.views import LoginView, LogoutView
from django.urls import path, re_path

app_name = 'account'

urlpatterns = [
    path('smoke/', views.smoke, name='smoke'),
    path('contact-us/', views.ContactUs.as_view(), name='contact-us'),
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('my-profile/', MyProfile.as_view(), name='my-profile'),
    path('sign-up/', SignUp.as_view(), name='sign-up'),
    path('change-password/', ChangePassword.as_view(), name='change-password'),
    re_path(
        r'^activate/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
        views.Activate.as_view(),
        name='activate'),
    path('users/', UserListView.as_view(), name='users'),
    path('user/<int:pk>/', UserReadUpdateDeleteView.as_view(), name='user'),
]
Пример #3
0
Файл: urls.py Проект: jioter/hw
from django.contrib import admin
from django.urls import path, include

from account.views import ProfileDetailView, SignUp
from article.views import IndexView, ArticleCreateView, ArticleDetailView, ArticleUpdateView, ArticleDeleteView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', IndexView.as_view(), name='index'),
    # Article
    path('article/create', ArticleCreateView.as_view(), name='create'),
    path('article/<int:article_id>',
         ArticleDetailView.as_view(),
         name='detail'),
    path('article/update/<int:article_id>',
         ArticleUpdateView.as_view(),
         name='update'),
    path('article/delete/<int:article_id>',
         ArticleDeleteView.as_view(),
         name='delete'),
    # Account
    path('account/profile/<int:profile_id>',
         ProfileDetailView.as_view(),
         name='profile'),
    path('account/', include('django.contrib.auth.urls')),
    path('account/signup', SignUp.as_view(), name='signup')
]
Пример #4
0
from django.conf.urls import url

from account.views import SignUp, login_view, login_user, logout_view, dashboard_view, profile_page

app_name = "account"

urlpatterns = [
    url(r'^register/$', SignUp.as_view(), name="signup"),
    url(r'^login/$', login_view, name="login"),
    url(r'^login_user/$', login_user, name="login_user"),
    url(r'^logout/$', logout_view, name="logout_view"),
    url(r'^dashboard/(?P<username>[\w.@+-]+)/$',
        dashboard_view,
        name="dashboard_view"),
    url(r'^(?P<username>[\w.@+-]+)/$', profile_page, name="profile"),
]
Пример #5
0
from django.urls import path, include
from django.contrib.auth import views as auth_views
from django.contrib.auth import views
from account.views import SignUp, UserProfileView, UserProfileEditView, Account_Activation_sent
from django.urls import reverse_lazy

app_name = 'account'

urlpatterns = [
    path('login/',
         views.LoginView.as_view(template_name="account/login.html"),
         name='login'),
    path('logout/', views.LogoutView.as_view(next_page='/'), name="logout"),
    path('signup/', SignUp.as_view(), name="signup"),
    #sign up email sent
    path('account_activation_sent/',
         Account_Activation_sent.as_view(),
         name='account_activation_sent'),
    path('change-password/',
         auth_views.PasswordChangeView.as_view(
             template_name="account/change_password.html",
             success_url=reverse_lazy('account:password_change_done')),
         name='password_change'),
    path('password_change_done/',
         auth_views.PasswordChangeDoneView.as_view(
             template_name="account/password_change_done.html"),
         name='password_change_done'),

    #password reset urls
    path('password_reset/',
         auth_views.PasswordResetView.as_view(