예제 #1
0
                basename='agency_candidate_cvs')
urlpatterns = router.urls

urlpatterns = [
    path('', include('rest_framework.urls', namespace='rest_framework')),
    path('', include('secure_documents.urls')),
    path('create/', CreateUserAPIView.as_view(), name='create'),
    path('me/', AccountInfoAPiView.as_view(), name='me'),
    path('delete/', DeleteAccountView.as_view(), name='delete_account'),
    path('check_email/', CheckEmailView.as_view(), name='check_email'),
    path('change_email/<uidb64>/<token>/<email>/',
         ChangeEmailView.as_view(),
         name='change_email'),
    path('activate/<uidb64>/<token>/', ActivateView.as_view(),
         name='activate'),
    path('change_password/',
         ChangePasswordView.as_view(),
         name='change_password'),
    path('upload_cv/', UploadCVView.as_view(), name='upload_cv'),
    path('upload_document/',
         UploadCompanyDocumentView.as_view(),
         name='upload_document'),
    path('identificate_candidate/',
         IdentificateCandidateProfileView.as_view(),
         name='identificate_candidate'),
    path('password_reset/',
         include('accounts.password_reset_urls', namespace='password_reset')),
]

urlpatterns = urlpatterns + router.urls
예제 #2
0
            name='profile_extensions'),
        url(r'^accounts/profile/edit$',
            login_required(UserUpdateView.as_view()),
            name='edit_profile'),
        url(r'^accounts/profile/backup/all-exams$',
            login_required(AllExamsView.as_view()),
            name='all_exams_download'),
        url(r'^accounts/profile/backup/all-questions$',
            login_required(AllQuestionsView.as_view()),
            name='all_questions_download'),
        )

if settings.CAN_CHANGE_PASSWORD:
    urlpatterns += patterns('',
        url(r'^accounts/profile/change-password$',
            login_required(ChangePasswordView.as_view()),
            name='change_password'
        ),
    )

    if settings.ALLOW_REGISTRATION:
        urlpatterns += patterns('',
                url(r'^accounts/activate/complete/$',
                    TemplateView.as_view(template_name='registration/activation_complete.html'),
                    name='registration_activation_complete'),

                # Activation keys get matched by \w+ instead of the more specific
                # [a-fA-F0-9]{40} because a bad activation key should still get to the view;
                # that way it can return a sensible "invalid key" message instead of a
                # confusing 404.
                url(r'^accounts/activate/(?P<activation_key>\w+)/$',
예제 #3
0
    url('^login/$', RedirectView.as_view(pattern_name='account:index'), 
        name='login'),
    url('^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}, 
        name='logout'), 
    url('^register/$', 'accounts.views.register', name='register'),
    url('^edit/$', UserDetailView.as_view(), name='edit'),
    url('^forgot/$', 'accounts.views.forgot', name='forgot_password'),
    url('^forgot/(?P<code>[a-f0-9]{32})$', 'accounts.views.forgot_reset', 
        name='forgot_reset'),
    url('^confirm-account/$', 'accounts.views.social_confirm',
        name='social_confirm'),
    url('^verify_new_email$', 'accounts.views.verify_new_email',
        name='verify_new_email'),
    url('^verify/(?P<code>[a-f0-9]{32})$', 'accounts.views.verify_email', 
        name='verify_email'),
    url('^change-password/$', ChangePasswordView.as_view(),
        name='change_password'),
]


if settings.DEBUG:
    _urlpatterns.extend([
        url('^promote-user$', 'accounts.views.promote_user'),
        url('^debug$', 'accounts.views.debug_page')
    ])


def urls(namespace='account'):
    """Returns a 3-tuple for use with include().

    The including module or project can refer to urls as namespace:urlname,
예제 #4
0
파일: urls.py 프로젝트: kairatomurbek2/kvn
from django.urls import path, include
from rest_framework_jwt.views import obtain_jwt_token, refresh_jwt_token, verify_jwt_token
from rest_framework import routers

from accounts import views
from accounts.views import ChangePasswordView

router = routers.DefaultRouter(trailing_slash=False)
router.register(r'users', views.UserViewSet)
router.register(r'users/(?P<user_pk>[0-9]+)/posts', views.UserPostViewSet, base_name='user_posts')
router.register(r'profession', views.ProfessionViewSet, 'profession')
router.register(r'profession/(?P<profession_pk>[0-9]+)/users', views.ProfessionUserViewSet,
                base_name='profession_users')

urlpatterns = [
    path(r'', include(router.urls)),
    path('api-token-auth/', obtain_jwt_token),
    path('change-password/', ChangePasswordView.as_view()),
    path('api-token-refresh/', refresh_jwt_token),
    path('api-token-verify/', verify_jwt_token)
]
예제 #5
0
    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 AuthRegister, ChangePasswordView, IdDuplicateCheckView
from rest_framework_jwt.views import obtain_jwt_token, verify_jwt_token, refresh_jwt_token
# from rest_framework_simplejwt.views import (
#     TokenObtainPairView,
#     TokenRefreshView,
# )

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/token/', obtain_jwt_token),
    path('api/token/verify/', verify_jwt_token),
    path('api/token/refresh/', refresh_jwt_token),

    #jwt
    path("api/rest-auth/", include('rest_auth.urls')),
    path("api/rest-auth/signup/", AuthRegister.as_view()),
    path("api/changepassword/", ChangePasswordView.as_view()),
    path("api/idDuplicateCheck/", IdDuplicateCheckView.as_view()),

    # books
    path("api/books/", include('books.urls')),

    # quizs
    path("api/quizs/", include('quizs.urls')),
]
예제 #6
0
    url(r'^profile/edit$',
        login_required(UserUpdateView.as_view()),
        name='edit_profile'),
    url(r'^profile/backup/all-exams$',
        login_required(AllExamsView.as_view()),
        name='all_exams_download'),
    url(r'^profile/backup/all-questions$',
        login_required(AllQuestionsView.as_view()),
        name='all_questions_download'),
)

if settings.CAN_CHANGE_PASSWORD:
    urlpatterns += patterns(
        '',
        url(r'^profile/change-password$',
            login_required(ChangePasswordView.as_view()),
            name='change_password'),
    )

if settings.ALLOW_REGISTRATION:
    urlpatterns += patterns(
        '',
        url(r'^activate/complete/$',
            TemplateView.as_view(
                template_name='registration/activation_complete.html'),
            name='registration_activation_complete'),

        # Activation keys get matched by \w+ instead of the more specific
        # [a-fA-F0-9]{40} because a bad activation key should still get to the view;
        # that way it can return a sensible "invalid key" message instead of a
        # confusing 404.
예제 #7
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'),
)
예제 #8
0
from django.conf.urls import url
from accounts.views import SignupView, LoginView, LogoutView, DeleteView
from accounts.views import ConfirmEmailView, resendConfirmation
from accounts.views import ChangePasswordView, PasswordResetView, PasswordResetTokenView
from accounts.views import UserSettingsView

urlpatterns = [
    url(r"^resend/$", resendConfirmation, name="resend_confirmation"),
    url(r"^signup/$", SignupView.as_view(), name="account_signup"),
    url(r"^login/$", LoginView.as_view(), name="account_login"),
    url(r"^logout/$", LogoutView.as_view(), name="account_logout"),
    url(r"^confirm_email/(?P<key>\w+)/$",
        ConfirmEmailView.as_view(),
        name="account_confirm_email"),
    url(r"^password/$", ChangePasswordView.as_view(), name="account_password"),
    url(r"^password/reset/$",
        PasswordResetView.as_view(),
        name="account_password_reset"),
    url(r"^password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$",
        PasswordResetTokenView.as_view(),
        name="account_password_reset_token"),
    url(r"^settings/$", UserSettingsView.as_view(), name="account_settings"),
    url(r"^delete/$", DeleteView.as_view(), name="account_delete"),
]
예제 #9
0
        name='logout'),
    url(r'^register/$', register, name='register'),
    url(r'^register_page/$', register_page, name='register_page'),
    url(r'^register_async/$', register_async, name='register_async'),
    url(r'^register_login_async/$', register_login_async, name='register_login_async'),
    url(r'^edit/$', UserDetailView.as_view(), name='edit'),
    url(r'^forgot/$', forgot, name='forgot_password'),
    url(r'^forgot/(?P<code>[a-f0-9]{32})$', forgot_reset,
        name='forgot_reset'),
    url(r'^confirm-account/$', social_confirm,
        name='social_confirm'),
    url(r'^verify_new_email$', verify_new_email,
        name='verify_new_email'),
    url(r'^verify/(?P<code>[a-f0-9]{32})$', verify_email,
        name='verify_email'),
    url(r'^change-password/$', ChangePasswordView.as_view(),
        name='change_password'),
    url(r'^$', index, name="index"),
]


if settings.DEBUG:
    from accounts.views import promote_user, debug_page
    urlpatterns.extend([
        url(r'^promote-user$', promote_user),
        url(r'^debug$', debug_page)
    ])


def urls(namespace='account'):
    """Returns a 3-tuple for use with include().
예제 #10
0
from django.urls import path, include
from django.conf.urls import url
from .router import router
import meetings 
#from rest_framework_jwt.views import obtain_jwt_token
from django.views.static import serve
from django.conf import settings
from accounts.views import Logout,MyTokenObtainPairView,ForgetPasswordView,ChangePasswordView
from rest_framework_simplejwt import views as jwt_views



urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/', include(router.urls)),
    path('meetings/', include('meetings.urls')),
    #path('paid_user/',UserViewSetPaid.as_view()),
    #path('login/',obtain_jwt_token),
    path('chat/', include('chat.api.urls', namespace='chat')),
    url(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT,}),
    #path('paid_user/',UserViewSetPaid.as_view())
    path('logout/' ,Logout.as_view()),
    path('login/' , MyTokenObtainPairView.as_view()),
    path('api/token/refresh/', jwt_views.TokenRefreshView.as_view(), name='token_refresh'),
    path('forgetpassword/' ,ForgetPasswordView.as_view()),
    path('api/token/verify/', jwt_views.TokenVerifyView.as_view(), name='token_verify'),
    path('changePassword/v1/',ChangePasswordView.as_view())


]
예제 #11
0
from profiles.views import ChangeProfileView, ProfileDetail
from trips.views import TripsList, CreateTrip


urlpatterns = [
    # Общедоступные и статические страницы
    path('', HomeView.as_view(), name='home'),

    # Регистрация и аутентификация
    path('login/', LoginView.as_view(template_name='accounts/login.html'), name='login'),
    path('logout/', LogoutView.as_view(template_name='accounts/logout.html'), name='logout'),
    path('register/', RegistrationView.as_view(), name='register'),

    # Профиль
    path('me', ProfileDetail.as_view(), name='profile-details'),

    # Настройки
    path('settings/account', ChangeAccountView.as_view(), name='settings-account'),
    path('settings/profile', ChangeProfileView.as_view(), name='settings-profile'),
    path('settings/password', ChangePasswordView.as_view(), name='settings-password'),

    # Поездки
    path('trips/list', TripsList.as_view(), name='trips-list'),
    path('trips/create', CreateTrip.as_view(), name='trips-create'),

    path('admin/', admin.site.urls),
] 

urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) 
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
예제 #12
0
"""BookShop URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/topics/http/urls/
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.urls import path, include

from accounts.views import UpdateUserView, CreateUserView, UserProfileView, ChangePasswordView

urlpatterns = [
    path("", include("django.contrib.auth.urls")),
    path("user/<int:pk>", UpdateUserView.as_view(), name='userchange'),
    path("userprofile/<int:pk>", UserProfileView.as_view(), name="userprofile"),
    path("changepassword/", ChangePasswordView.as_view(), name="changepassword"),
    path("registration/", CreateUserView.as_view(), name="registration"),

]