示例#1
0
from django.urls import path
from users.views import UserLoginView, UserLogoutView, UserDetailView, UserSignupView, UserUpdateView, UserFollowView

app_name = 'users'

urlpatterns = [
    path('login/', UserLoginView.as_view(), name='login_user'),
    path('logout/', UserLogoutView.as_view(), name='logout_user'),
    path('perfil/<int:pk>', UserDetailView.as_view(), name='detail_user'),
    path('signup/', UserSignupView.as_view(), name='signup_user'),
    path('editar_perfil/<int:pk>/',
         UserUpdateView.as_view(),
         name='update_user'),
    path('seguir/<int:pk>/', UserFollowView.as_view(), name='follow_user')
]
示例#2
0
from django.urls import path
from users.views import (
    ProfileView,
    ProfileEditView,
    UserLoginView,
    UserLogoutView,
    UserSignupView,
    FollowUserView,
    FollowersUserView,
)

app_name = 'users'

urlpatterns = [
    path('perfil/<int:pk>/', ProfileView.as_view(), name="profile"),
    path('perfil/<int:pk>/editar/',
         ProfileEditView.as_view(),
         name="profile-edit"),
    path('login/', UserLoginView.as_view(), name="login"),
    path('logout/', UserLogoutView.as_view(), name="logout"),
    path('signup/', UserSignupView.as_view(), name="signup"),
    path('seguir/<int:pk>', FollowUserView.as_view(), name="seguir"),
    path('perfil/<int:pk>/seguidores',
         FollowersUserView.as_view(),
         name="seguidores"),
]

#users(app_name):profile(name)
示例#3
0
from django.urls import path, include
from users.views import ProfileView, ProfileEditView, UserLoginView, \
                        UserLogoutView, UserSignupView

app_name = 'users'

urlpatterns = [
    path('perfil/<int:pk>/', ProfileView.as_view(), name='profile'),
    path('perfil/<int:pk>/editar/', ProfileEditView.as_view(), name='profile-edit'),
    path('login/', UserLoginView.as_view(), name="login"),
    path('logout/', UserLogoutView.as_view(), name="logout"),
    path('cadastro/', UserSignupView.as_view(), name='signup'),
]
示例#4
0
from django.conf.urls import url
from django.views.generic import TemplateView, View
from users.views import UsersHomeView, UserSignupView

urlpatterns = [
    url(r'^$', UsersHomeView.as_view(), name='users_view'),
    url(r'^signup/$', UserSignupView.as_view(), name='user_signup_view'),
]
示例#5
0
from django.urls import path
from users.views import (
    ProfileView, 
    ProfileEditView, 
    UserLoginView,
    UserLogoutView,
    UserSignupView,
    FollowersListView,
)
app_name = 'users'

urlpatterns = [
    path('perfil/<int:pk>/', ProfileView.as_view(), name='profile'),
    path('perfil/<int:pk>/editar/', ProfileEditView.as_view(), name='edit'),
    path('login/', UserLoginView.as_view(), name='login'),
    path('logout/', UserLogoutView.as_view(), name='logout'),
    path('cadastro/', UserSignupView.as_view(), name='signup'),

    #Actions
    path('follow/<int:pk>/', FollowersListView.as_view(), name='follow'),
]
示例#6
0
from django.urls import path
from users.views import UserLoginView, UserDetailView, UserListView, UserSignupView, UserLogoutView

app_name = 'users'

urlpatterns = [
    path('login', UserLoginView.as_view(), name='login'),
    path('signup', UserSignupView.as_view(), name='signup'),
    path('logout', UserLogoutView.as_view(), name="logout"),
    path('details/<int:pk>/', UserDetailView.as_view(), name="details"),
]
示例#7
0
    # Checkout CRUD
    path('checkouts/', include([
        path('', CheckoutListView.as_view(), name='checkout_list'),
        path('create/', CheckoutCreateView.as_view(), name='checkout_create'),
        path('<int:pk>/', CheckoutReadView.as_view(), name='checkout_read'),
        path('<int:pk>/open/', CheckoutOpenView.as_view(), name='checkout_open'),
        path('<int:pk>/save/', CheckoutSaveView.as_view(), name='checkout_save'),
        path('<int:pk>/close/', CheckoutCloseView.as_view(), name='checkout_close')
    ])),
    # Shortcut to `checkout_create`
    path('open/', CheckoutCreateView.as_view(), name='checkout_create_shortcut'),

    # User sign in, settings etc
    path('beta/', BetaTokenView.as_view(), name='user_beta'),
    path('me/', UserSettingsView.as_view(), name='user_settings'),
    path('me/signup/', UserSignupView.as_view(), name='user_signup'),
    path('me/signin/', UserSigninView.as_view(), name='user_signin'),
    path('me/signout/', UserSignoutView.as_view(), name='user_signout'),
    path('me/username/', UsernameChangeView.as_view(), name='user_change_username'),
    path('me/avatar/', include('avatar.urls')),
    path('me/', include('allauth.urls')),

    # Staff admin
    path('admin/', admin.site.urls),

    # Home page
    path('', HomeView.as_view(), name='home'),

    # About pages etc
    path('about/', AboutView.as_view(), name='about'),
    path('about/contact/', ContactView.as_view(), name='contact'),
示例#8
0
handler404 = 'blog.views.page_not_found'
handler500 = 'blog.views.server_error'
handler403 = 'blog.views.permission_denied'

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('blog.urls')),
    path('login/',
         CustomLoginView.as_view(template_name='users/login.html'),
         name='login'),
    path('logout/',
         auth_views.LogoutView.as_view(template_name='users/logout.html'),
         name='logout'),
    path('signup/',
         UserSignupView.as_view(template_name='users/signup.html'),
         name='signup'),
    path('profile/',
         ProfileUpdateView.as_view(template_name='users/profile.html'),
         name='profile'),
    path('password_reset/',
         PasswordResetView.as_view(
             template_name='users/password_reset_form.html'),
         name='password_reset'),
    path('password_reset_done/',
         auth_views.PasswordResetDoneView.as_view(
             template_name='users/password_reset_done.html'),
         name='password_reset_done'),
    path('password_reset_confirm/<uidb64>/<token>/',
         auth_views.PasswordResetConfirmView.as_view(
             template_name='users/password_reset_confirm.html'),
示例#9
0
from django.urls import path
from users.views import UserListView, UserLoginView, UserLogoutView, UserSignupView, UserDetailView

app_name = 'users'

urlpatterns = [
    path('list', UserListView.as_view(), name='list_users'),
    path('login', UserLoginView.as_view(), name='login_users'),
    path('logout', UserLogoutView.as_view(), name='logout_users'),
    path('register', UserSignupView.as_view(), name='register_users'),
    path('users/<int:pk>/detail',
         UserDetailView.as_view(),
         name='detail_users'),
]