Ejemplo n.º 1
0
from django.contrib import admin
from django.urls import path
from django.urls import reverse_lazy
from apps.common.views import HomeView, SignUp, DashboardView, ProfileUpdateView, ProfileView
from django.contrib.auth import views as auth_views
urlpatterns = [
    path('admin/', admin.site.urls),
    path('', HomeView.as_view(), name="home"),
    path('registration/', SignUp.as_view(), name='registration'),
    path("login/",
         auth_views.LoginView.as_view(template_name="common/login.html"),
         name="login"),
    path("logout/",
         auth_views.LogoutView.as_view(next_page='home'),
         name="logout"),
    path("dashboard/", DashboardView.as_view(), name="dashboard"),
    path("changepassword/",
         auth_views.PasswordChangeView.as_view(
             template_name="common/changepassword.html",
             success_url=reverse_lazy('home')),
         name="changepassword"),
    path('password-reset/',
         auth_views.PasswordResetView.as_view(
             template_name='common/password-reset/password_reset.html',
             subject_template_name=
             'common/password-reset/password_reset_subject.txt',
             email_template_name=
             'common/password-reset/password_reset_email.html',
             success_url='/login/'),
         name='password_reset'),
    path('password-reset/done/',
Ejemplo n.º 2
0
    path('profile/', ProfileView.as_view(), name='profile'),
    path('profile/<str:username>',
         ProfileViewFriend.as_view(),
         name='profile-friend'),
    path('register/', SignUpView.as_view(), name='register'),
    path('login/',
         auth_views.LoginView.as_view(template_name='common/login.html'),
         name='login'),
    path('logout/',
         auth_views.LogoutView.as_view(next_page='home'),
         name='logout'),
    path('change-password/',
         auth_views.PasswordChangeView.as_view(
             template_name='common/change-password.html', success_url='/'),
         name='change_password'),
    path('dashboard/', DashboardView.as_view(), name='dashboard'),
    path('post_new/', PostCreateView.as_view(), name='post_new'),
    path('post/<int:pk>/update/', PostUpdateView.as_view(),
         name='post-update'),
    path('blogs/', PostListView.as_view(), name='blogs'),

    # path('blog/<int:pk>/', PostDetailView.as_view(), name='post-detail'),
    path('post/<int:pk>/del/', PostDeleteView.as_view(), name='post-delete'),

    # Forget Password
    path(
        'password-reset/',
        auth_views.PasswordResetView.as_view(
            template_name='common/password-reset/password_reset.html',
            subject_template_name=
            'common/password-reset/password_reset_subject.txt',
Ejemplo n.º 3
0
    path('', HomeView.as_view(), name='home'),

    path('profile-update/', ProfileUpdateView.as_view(), name='profile-update'),
    path('profile/', ProfileView.as_view(), name='profile'),

    path('register/', SignUpView.as_view(), name="register"),

    path('login/', auth_views.LoginView.as_view(
        template_name='common/login.html'
    ),
         name='login'),
    path('logout/', auth_views.LogoutView.as_view(
        next_page='home'
    ),
         name='logout'),
    path('dashboard/', DashboardView.as_view(), name="dashboard"),

    path(
        'change-password',
        auth_views.PasswordChangeView.as_view(
            template_name='common/change-password.html',
            success_url='/'
             ),
        name='change-password'
    ),

     path('password-reset/',
         auth_views.PasswordResetView.as_view(
             template_name='common/password-reset/password_reset.html',
             subject_template_name='common/password-reset/password_reset_subject.txt',
             email_template_name='common/password-reset/password_reset_email.html',