예제 #1
0
from django.urls import path
from . import views
from users.views import RegisterView, LoginView, PasswordResetView, PasswordChangeView, PasswordChangeDoneView, PasswordResetDoneView, PasswordResetCompleteView, PasswordResetConfirmView
from django.contrib.auth import views as auth_views
urlpatterns = [

    path('register/', RegisterView.as_view(), name='register'),
    path ('login/',LoginView.as_view(), name='login'),
    path ('logout/',auth_views.LogoutView.as_view(), name='logout'),
    path ('password-reset/',PasswordResetView.as_view(), name='password_reset'),
    path('password-reset/done/', PasswordResetDoneView.as_view(), name='password_reset_done'),
    path('reset/<uidb64>/<token>/', PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
    path('reset/done/', PasswordResetCompleteView.as_view(), name='password_reset_complete'),
    path('password-change/', PasswordChangeView.as_view(), name='password_change'),
    path('password-change/done/', PasswordChangeDoneView.as_view(), name='password_change_done'),
 

]
예제 #2
0
from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import password_reset_confirm, password_reset_complete
from users.views import LoginView, LogoutView, RegistrationView, GetUserView, PasswordResetView

urlpatterns = patterns('',
    url(r'^login/', LoginView.as_view()),
    url(r'^logout/', LogoutView.as_view()),
    url(r'^register/', RegistrationView.as_view()),
    url(r'^get/', GetUserView.as_view()),
    url(r'^password_reset/', PasswordResetView.as_view()),
    url(r'^confirm_reset/(?P<uidb64>[\d\w\-_]+)/(?P<token>[\d\w-]+)/', password_reset_confirm, name='password_reset_confirm'),
    url(r'^complete_reset/', password_reset_complete, name='password_reset_complete'),
)
예제 #3
0
from django.conf.urls import url

from users.views import (LoginView, LogoutView, UserDetailsView,
                         PasswordChangeView, PasswordResetView,
                         PasswordResetConfirmView)

urlpatterns = [
    # URLs that do not require a session or valid token
    url(r'^password/reset/$',
        PasswordResetView.as_view(),
        name='rest_password_reset'),
    url(r'^password/reset/confirm/$',
        PasswordResetConfirmView.as_view(),
        name='rest_password_reset_confirm'),
    url(r'^login/$', LoginView.as_view(), name='rest_login'),
    # URLs that require a user to be logged in with a valid session / token.
    url(r'^logout/$', LogoutView.as_view(), name='rest_logout'),
    url(r'^user/$', UserDetailsView.as_view(), name='rest_user_details'),
    url(r'^password/change/$',
        PasswordChangeView.as_view(),
        name='rest_password_change'),
]
예제 #4
0
from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import password_reset_confirm, password_reset_complete
from users.views import LoginView, LogoutView, RegistrationView, GetUserView, PasswordResetView

urlpatterns = patterns(
    '',
    url(r'^login/', LoginView.as_view()),
    url(r'^logout/', LogoutView.as_view()),
    url(r'^register/', RegistrationView.as_view()),
    url(r'^get/', GetUserView.as_view()),
    url(r'^password_reset/', PasswordResetView.as_view()),
    url(r'^confirm_reset/(?P<uidb64>[\d\w\-_]+)/(?P<token>[\d\w-]+)/',
        password_reset_confirm,
        name='password_reset_confirm'),
    url(r'^complete_reset/',
        password_reset_complete,
        name='password_reset_complete'),
)
예제 #5
0
파일: urls.py 프로젝트: e-dang/Autogarden
API_PREFIX = 'api/'

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', home, name='home'),
    path(API_PREFIX + 'gardens/<str:name>/',
         GardenAPIView.as_view(),
         name='api-garden'),
    path(API_PREFIX + 'gardens/<str:name>/watering-stations/',
         WateringStationAPIView.as_view(),
         name='api-watering-stations'),
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', LogoutView.as_view(), name='logout'),
    path('register/', CreateUserView.as_view(), name='register'),
    path('reset_password/',
         PasswordResetView.as_view(template_name='reset_password.html'),
         name='reset_password'),
    path('reset_password_sent/',
         auth_views.PasswordResetDoneView.as_view(
             template_name='reset_password_sent.html'),
         name='password_reset_done'),
    path('reset/<uidb64>/<token>/',
         PasswordResetConfirmView.as_view(
             template_name='reset_password_confirm.html'),
         name='password_reset_confirm'),
    path('reset_password_complete/',
         auth_views.PasswordResetCompleteView.as_view(
             template_name='reset_password_complete.html'),
         name='password_reset_complete'),
    path('password_change/',
         auth_views.PasswordChangeView.as_view(
예제 #6
0
파일: urls.py 프로젝트: win77g/tohashop
router.register(r'productinorder', ProductInBasketViewSet)
router.register(r'getuser', ClientViewSet),
router.register(r'getorder', OrderViewSet),
router.register(r'productinorderbyid', ProductInOrderViewSet),
router.register(r'gallery', GetProductImageViewSet),
router.register(r'bigslider', BigSliderViewSet)
router.register(r'advetising', AdvertisingImageViewSet)
router.register(r'blog', BlogViewSet)
router.register(r'teg', TegViewSet)
router.register(r'wishlist', WishlistViewSet)
router.register(r'quethen', QuethenViewSet)

urlpatterns = [
    path('', include(router.urls)),
    path('auth/', include('djoser.urls')),
    path('auth/', include('djoser.urls.authtoken')),
    path('auth/', include('djoser.urls.jwt')),
    path('search/', SearchAPIView.as_view()),
    path('productinbasket/', ProductInBasket.as_view()),
    path('deleteproductinbasket/', DeleteProductInBasket.as_view()),
    path('updateproductinbasket/', UpdateProductInBasket.as_view()),
    path('order/',Order.as_view()),
    path('wishlispost/',WishlistPost.as_view()),
    path('deletewishlist/',DeleteWishlist.as_view()),
    path('changepassword/',SendMailForNewEmail.as_view()),
    path('password/reset/confirm/', PasswordResetView.as_view(),),

]\
               + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)\
               + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
예제 #7
0
    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'),
         name='password_reset_confirm'),
    path('password_reset_complete/',
         auth_views.PasswordResetCompleteView.as_view(
             template_name='users/password_reset_complete.html'),
         name='password_reset_complete'),
    re_path(r'^ckeditor/', include('ckeditor_uploader.urls')),
]
예제 #8
0
파일: urls.py 프로젝트: mazer9/Petfinder
from django.urls import path
from users.views import CreateUser, EmailAuth, PasswordResetView, LoginUser, LogoutUser, CommentViewSet
from rest_framework import routers

router = routers.SimpleRouter()

urlpatterns = [
    path('registration/',
         CreateUser.as_view({'post': 'create'}),
         name='registration'),
    path('email_auth/',
         EmailAuth.as_view({
             'post': 'create',
             'get': 'get'
         }),
         name='email_auth'),
    path('reset_password/',
         PasswordResetView.as_view({
             'post': 'create',
             'get': 'get'
         }),
         name='reset_password'),
    path('login/', LoginUser.as_view({'post': 'login_user'}), name='login'),
    path('logout/', LogoutUser.as_view({'post': 'logout_user'}),
         name='logout'),
    path('comment_create/',
         CommentViewSet.as_view({'post': 'create'}, name='comment_create'))
]
예제 #9
0
    path('register/', UserRegisterView, name='register'),
    path('', include('feed.urls')),
    path('<int:pk>/', include('posts.urls')),
    path('search/', include('search.urls')),
    path('notifications/', include('notifications.urls')),
    path('profile-<username>/', ProfileView, name='profile'),
    path('profile-<username>/followers/',
         FollowerListView,
         name='follower_list'),
    path('profile-<username>/following/',
         FollowingListView,
         name='following_list'),
    path('profile-<username>/edit/', EditProfileView, name='profile-edit'),
    path('create/', PostCreateView.as_view(), name='create'),
    path('requests/', RequestView, name='requests'),
    path('password-reset/', PasswordResetView.as_view(),
         name='password_reset'),
    path('password-reset/done/',
         PasswordResetDoneView.as_view(),
         name='password_reset_done'),
    path('password-reset/<uidb64>/<token>/',
         PasswordResetConfirmView.as_view(),
         name='password_reset_confirm'),
    path('password-reset-complete/',
         PasswordResetCompleteView.as_view(),
         name='password_reset_complete'),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
예제 #10
0
from django.conf.urls import url
from users.views import UserRegisterView, LoginView, UserDetailsView, PasswordResetView, PasswordResetConfimView
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView

urlpatterns = [
    url(r'signup/', UserRegisterView.as_view(), name='register'),
    url(r'login/', LoginView.as_view(), name='login'),
    url(r'^refresh_token/', TokenRefreshView.as_view(), name='token_refresh'),
    url(r'^passwordReset/', PasswordResetView.as_view(), name='pasword_reset'),
    url(r'^passwordResetConfirm/',
        PasswordResetConfimView.as_view(),
        name='pasword_reset_confirm'),
    url(r'^me/$', UserDetailsView.as_view(), name='user_details')
]