Beispiel #1
0
from django.urls import path, include
from .api import LoginAPI, UserAPI
from knox.views import LogoutView as LogoutAPI

urlpatterns = [
    path('auth', include('knox.urls')),
    path('auth/login', LoginAPI.as_view()),
    path('auth/user', UserAPI.as_view()),
    path('auth/logout', LogoutAPI.as_view()),
]
Beispiel #2
0
from django.urls import path
from knox.views import LogoutView

from .views import (RegistrationAPI, LoginAPI, UserAPI, GetUser)

urlpatterns = [
    #account
    path("auth/register/", RegistrationAPI.as_view()),
    path("auth/login/", LoginAPI.as_view()),
    path("auth/logout/", LogoutView.as_view()),
    path("auth/user/", UserAPI.as_view()),
    path("auth/user/<int:pk>/", GetUser.as_view())

    #Student
]
Beispiel #3
0
from django.urls import path

from usuarios.api_views import UserAPI, LoginAPI
from knox.views import LogoutView, LogoutAllView

urlpatterns = [
    path('user/', UserAPI.as_view()),
    path('login/', LoginAPI.as_view()),
    path('logout/', LogoutView.as_view()),
    path('logoutall/', LogoutAllView.as_view()),
]
Beispiel #4
0
from django.contrib import admin
from django.views.generic.base import RedirectView
from rest_framework.routers import DefaultRouter
from rest_framework.authtoken import views
from .users.views import UserViewSet, UserLoginViewSet

from knox.views import LogoutView
from knox.views import LogoutAllView

router = DefaultRouter()
router.register(r'users', UserViewSet)
router.register(r'auth', UserLoginViewSet)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/v1/', include(router.urls)),
    path('api-token-auth/', views.obtain_auth_token),
    path('api-auth/', include('rest_framework.urls',
                              namespace='rest_framework')),
    path('api/v1/auth/logout/', LogoutView.as_view(), name='auth-logout'),
    path('api/v1/auth/logout-all/',
         LogoutAllView.as_view(),
         name='auth-logout-all'),

    # the 'api-root' from django rest-frameworks default router
    # http://www.django-rest-framework.org/api-guide/routers/#defaultrouter
    re_path(
        r'^$',
        RedirectView.as_view(url=reverse_lazy('api-root'), permanent=False)),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
"""document_approver_server URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from knox.views import LogoutView

from .auth.views import LoginView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^api-auth/',
        include('rest_framework.urls', namespace='rest_framework')),
    url(r'^', include('document_receivings.urls')),
    url(r'^auth/login/$', LoginView.as_view()),
    url(r'^auth/logout/$', LogoutView.as_view()),
    url(r'^auth/logoutall/$', LogoutView.as_view())
]
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from .views import LeaderBoard, getClue, getRound, putClue, checkRound, leaderboard, Login, Register
from knox.views import LogoutView
urlpatterns = [
    path('leaderboard', leaderboard.as_view(), name='leaderboard'),
    path('saveLeaderBoard', LeaderBoard, name="download"),
    path('getRound', getRound.as_view(), name='round'),
    path('checkRound', checkRound.as_view(), name="checkRound"),
    path('getClue', getClue.as_view(), name="clue"),
    path('checkClue', putClue.as_view(), name="checkClue"),
    path('auth/login', Login.as_view(), name="login"),
    path('auth/register', Register.as_view(), name="register"),
    path('auth/logout', LogoutView.as_view(), name="logout")
]
Beispiel #7
0
from django.urls import path
from rest_framework.urlpatterns import format_suffix_patterns
from .views import RegistrationView, SignInView
from knox.views import LogoutView, LogoutAllView

urlpatterns = [
    path('register/', RegistrationView.as_view(), name="register"),
    path('login/', SignInView.as_view(), name="login"),
    path('logout/', LogoutView.as_view(), name="logout"),
    path('logoutall/', LogoutAllView.as_view(), name="logout-all"),
]

urlpatterns = format_suffix_patterns(urlpatterns)
Beispiel #8
0
from django.urls import re_path

from knox.views import LogoutView, LogoutAllView

from .views import LoginView, RegisterView, LoggedInView

urlpatterns = [
    re_path(r'^register/?', RegisterView.as_view()),
    re_path(r'^login/?', LoginView.as_view()),
    re_path(r'^logout/?', LogoutView.as_view()),
    re_path(r'^logoutall/?', LogoutAllView.as_view()),
    re_path(r'^logged_in/?', LoggedInView.as_view()),
]
Beispiel #9
0
from django.urls import re_path
from django.contrib import admin
from django.conf import settings
from django.conf.urls import include
from django.conf.urls.static import static

from rest_framework import routers

from knox.views import LogoutView

from apps.post import views as post_views
from apps.user_profile import views as user_profile_views
from apps.analytics import views as analytics_views

router = routers.DefaultRouter()
router.register(r'post', post_views.PostViewSet, basename='post')
router.register(r'auth-confirm', user_profile_views.AuthConfirm, basename='auth-confirm')
router.register(r'analytics', analytics_views.AnalyticsViewSet, basename='analytics')


urlpatterns = [
    re_path(r'^api/', include(router.urls)),
    re_path(r'^admin/', admin.site.urls),
    re_path(r'^api/auth/sign-up/', user_profile_views.RegistrationView.as_view(), name='sign-up'),
    re_path(r'^api/auth/sign-in/', user_profile_views.LoginView.as_view(), name='sign-in'),
    re_path(r'^api/auth/logout/', LogoutView.as_view(), name='auth-logout'),

]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Beispiel #10
0
from django.conf.urls import url, include
from rest_framework import routers

from . import views
from knox.views import LogoutView, LogoutAllView

router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)

urlpatterns = [
    url(r'api/auth/login/', views.LoginView.as_view(), name='knox_login'),
    url(r'api/auth/logout/', LogoutView.as_view(), name='knox_logout'),
    url(r'api/auth/logoutall/', LogoutAllView.as_view(),
        name='knox_logoutall'),
    url(r'api/categories/$',
        views.CategoryListView.as_view(),
        name='list_categories'),
    url(r'api/categories/(?P<slug>[\w\d-]+)/$',
        views.CategoryDetailView.as_view(),
        name='view_category'),
    url(r'api/posts/$', views.list_posts, name='list_posts'),
    url(r'api/posts/(?P<slug>[\w\d-]+)/$', views.view_post, name='view_post'),
    url(r'api/tags/$', views.TagListView.as_view(), name='list_tags'),
    url(r'api/', include(router.urls)),
]
Beispiel #11
0
from rest_framework import routers
from . import views
from knox.views import LoginView, LogoutView, LogoutAllView
from .views import *
app_name = 'api'

router = routers.DefaultRouter()
router.register(r'questions', views.QuestionViewSet)
router.register(r'topics', views.TopicViewSet)
router.register(r'subjects', views.SubjectViewSet)
router.register(r'users', views.UsersViewSet)
router.register(r'groups', views.GroupViewSet)

# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
urlpatterns = [
    path("api-key", views.generateAPIKey, name="generate-api-key"),
    path('v1/', include(router.urls)),
    url(r'v1/auth/get-token', LoginView.as_view(), name='knox_login'),
    url(r'v1/auth/delete-token', LogoutView.as_view(), name='knox_logout'),
    url(r'v1/auth/delete-all-tokens',
        LogoutAllView.as_view(),
        name='knox_logoutall'),

    # path('v1/login', LoginView.as_view()),
    # path('v1/logout',LogoutView.as_view()),
    # path('v1/logoutall/', LogoutAllView.as_view(), name='knox_logoutall'),

    # path('api-auth/', include('rest_framework.urls', namespace='rest_framework')),
]
Beispiel #12
0
from django.urls import path
from django.views.decorators.csrf import csrf_exempt
from knox.views import LogoutView
from .views import LoginView

urlpatterns = [
    path('api/login/', csrf_exempt(LoginView.as_view())),
    path('api/logout/', LogoutView.as_view())
]
Beispiel #13
0
 def post(self, request, *args, **kwargs):
     user = request.user
     user.profile.active = False
     user.profile.save()
     view = LogoutView.as_view()
     return view(request._request, *args, **kwargs)
Beispiel #14
0
         name='create-user'),
    path('login', accountViews.LoginView.as_view(), name='login-user'),
    path('request-access',
         recordViews.RecordUploadRequestView.as_view(),
         name='request-access'),
    path('verify-access-otp',
         recordViews.OTPVerificationView.as_view(),
         name='verify-access-otp'),
    re_path(r'^upload-record/(?P<patient_phone>\d{10})/(?P<filename>.+)',
            recordViews.UploadRecordView.as_view(),
            name='upload-record'),
    re_path(r'^get-record/(?P<patient_phone>\d{10})',
            recordViews.GetPatientRecordView.as_view(),
            name='get-record-doctor'),
    path('get-record',
         recordViews.GetPatientRecordView.as_view(),
         name='get-record-patient'),
    path('get-history',
         detailViews.GetTreatmentHistoryView.as_view(),
         name='get-history'),
    path('patient-details',
         detailViews.PatientDetailsView.as_view(),
         name='patient-details'),
    re_path(r'^patient-details/(?P<patient_phone>\d{10})',
            detailViews.PatientDetailsView.as_view(),
            name='patient-details'),
    path('logout', LogoutView.as_view(), name="logout-user"),
    re_path(r'^fetch-record/(?P<path>.+)',
            recordViews.MyFetchView.as_view(),
            name=FETCH_URL_NAME)
]
Beispiel #15
0
from django.urls import path, include
from django.conf.urls import url
from knox.views import LogoutView
from .views import HelloAPI, RegistrationAPI, LoginAPI, UserAPI, PostListAPI, PostDetailAPI, PostFavoriteAPI, PostFavoriteListAPI

urlpatterns = [
    path("hello/", HelloAPI),
    path("auth/register/", RegistrationAPI.as_view()),
    path("auth/login/", LoginAPI.as_view()),
    path("auth/user/", UserAPI.as_view()),
    path("list/", PostListAPI.as_view()),
    path("detail/<int:pk>/", PostDetailAPI.as_view()),
    path("auth/logout/", LogoutView.as_view(), name='knox_logout'),
    path("favorite/<int:pk>/", PostFavoriteAPI.as_view()),
    path("favorite/", PostFavoriteListAPI.as_view()),
]
Beispiel #16
0
from django.conf.urls import url, include
from django.contrib import admin
from django.urls import path
from django.conf import settings
from django.conf.urls.static import static

from .api_urls import router
from index.views import IndexView
from knox.views import LogoutView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/auth/logout', LogoutView.as_view()),
    path('api/', include(router.urls)),
    url(r'^app/*', IndexView.as_view()),
    url(r'^silk/', include('silk.urls', namespace='silk')),
    path('', include('index.urls')),
]

if settings.DEBUG:
    # urlpatterns = [
    #                   url(r'^silk/', include('silk.urls', namespace='silk')),
    #               ] + urlpatterns
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Beispiel #17
0
from django.urls import path

from knox.views import LogoutView

from . import views, api_views

app_name = 'profiles'

urlpatterns = [
    path('student-signup/',
         views.StudentSignUp.as_view(),
         name='student-signup'),
    path('teacher-signup/',
         views.TeacherSignUp.as_view(),
         name='teacher-signup'),
    path('v1/register-student/',
         api_views.register_student,
         name='register-student-api'),
    path('v1/register-teacher/',
         api_views.register_teacher,
         name='register-teacher-api'),
    path('v2/register-student/', api_views.CreateStudentView.as_view()),
    path('v2/register-teacher/', api_views.CreateTeacherView.as_view()),
    path('v2/login/', api_views.LoginView.as_view()),
    path('v2/logout/', LogoutView.as_view(), name='knox_logout'),
    path('v2/user/', api_views.get_user),
    path('v2/student/', api_views.StudentView.as_view()),
    path('v2/teacher/', api_views.TeacherView.as_view()),
]
from django.urls import path, include, re_path
from .views import ValidatePhoneSendOTP, ValidateOTP, Register, LoginView, UserDetailView, FileUploadView
from knox.views import LogoutView as Logout
urlpatterns = [
    re_path(r'^validate/', ValidatePhoneSendOTP.as_view()),
    re_path(r'^verify_otp/', ValidateOTP.as_view()),
    re_path(r'^register/', Register.as_view()),
    re_path(r'^login/$', LoginView.as_view()),
    re_path(r'^logout/$', Logout.as_view()),
    re_path(r'^profile/$', UserDetailView.as_view()),
    re_path(r'^pic/$', FileUploadView.as_view())
]
from django.urls import path, include, re_path
from rest_framework.authtoken import views
from knox.views import LogoutView
from .views import *

urlpatterns = [
    re_path(r'^auth/register$', RegistrationAPIView.as_view()),
    re_path(r"^auth/login$", LoginAPIView.as_view()),
    re_path(r'^auth/logout$', LogoutView.as_view()),
    re_path(r'^auth/user$', UserRetrieveUpdateAPIView.as_view()),
    re_path(r'^auth/user/update$', UserRetrieveUpdateAPIView.as_view()),
]
Beispiel #20
0
from django.urls import path
from .api import LoginView, RegisterView, UserAPIView
from knox.views import LogoutView

urlpatterns = [
    path('api/accounts/login/', LoginView.as_view()),
    path('api/accounts/register/', RegisterView.as_view()),
    path('api/accounts/user/', UserAPIView.as_view()),
    path('api/accounts/logout/', LogoutView.as_view())
]
Beispiel #21
0
from django.conf.urls import url, include

from knox.views import LogoutView

from .views import RegisterAPI, LoginAPI, UserAPI

urlpatterns = [
    url(r'^', include('knox.urls')),
    url(r'^register', RegisterAPI.as_view()),
    url(r'^login', LoginAPI.as_view()),
    url(r'^user', UserAPI.as_view()),
    url(r'^logout', LogoutView.as_view(), name='knox_logout')
]
Beispiel #22
0
from django.conf.urls import url
from knox.views import LogoutView

from .views import LoginView

app_name = "accounts"
urlpatterns = [
    url(r"^login/", LoginView.as_view(), name="login"),
    url(r"^logout/", LogoutView.as_view(), name="logout"),
]
Beispiel #23
0
from django.urls import path, include
from .api import RegisterView, LoginView, UserView
from knox.views import LogoutView, LogoutAllView

urlpatterns = [
    path('api/auth', include('knox.urls')),
    path('api/auth/register', RegisterView.as_view()),
    path('api/auth/login', LoginView.as_view()),
    path('api/auth/user', UserView.as_view()),
    path('api/auth/logout', LogoutView.as_view(), name="knox_logout"),
    path('api/auth/logoutall', LogoutAllView.as_view(), name="knox_logoutall"),
]
Beispiel #24
0
from knox.views import LogoutView, LogoutAllView
from authentication.views import LoginView
from django.conf.urls import url

urlpatterns = [
    url(r'login/', LoginView.as_view(), name="login_view"),
    url(r'logout/', LogoutView.as_view(), name="logout_view"),
    url(r'logoutall/', LogoutAllView.as_view(), name="logout_all_view"),
]
Beispiel #25
0
from django.urls import path, include
from rest_framework.urlpatterns import format_suffix_patterns
from knox.views import LogoutView
from . import views

urlpatterns = format_suffix_patterns([
    path('posts/', views.posts_list, name='posts_list'),
    path('posts/create/', views.post_create, name='post_create'),
    path('posts/<int:pk>/', views.posts_detail, name='posts_detail'),
    path('auth/register/', views.register_api, name='register_api'),
    path('auth/login/', views.login_api, name='login_api'),
    path('auth/user/', views.user_status, name='user_status'),
    path('auth/logout/', LogoutView.as_view()),
])
Beispiel #26
0
from django.urls import path
from .views import (register_view,
                    get_user_view,
                    login_view, confirm_registration_view,
                    create_password_reset_token_view,
                    reset_password_view)
from knox.views import LogoutView

urlpatterns = [
    path("", get_user_view),
    path("register/", register_view),
    path("login/", login_view),
    path("logout/", LogoutView.as_view(), name="LogoutView"),
    path("confirmregistration/", confirm_registration_view),
    path("resetpassword/getusername/", create_password_reset_token_view),
    path("resetpassword/", reset_password_view),
]
from django.urls import path, include

from knox.views import LogoutView

from .views import UserAPIView, RegisterAPIView, LoginAPIView

urlpatterns = [
    path('', include('knox.urls')),
    path('user', UserAPIView.as_view()),
    path('register', RegisterAPIView.as_view()),
    path('auth', LoginAPIView.as_view()),
    path('logout', LogoutView.as_view(), name='knox_logout')
]
Beispiel #28
0
from django.urls import path, include

from knox.views import LogoutView

from .views import (
    IndividualUserRegisterAPIView,
    CorporateUserRegisterAPIView,
    LoginAPIView,
    UserAPIView,
)

urlpatterns = [
    path("", include("knox.urls")),  # LogoutView를 사용하기 위함
    path("user", UserAPIView.as_view()),
    path("login", LoginAPIView.as_view()),
    path("i-register", IndividualUserRegisterAPIView.as_view()),
    path("c-register", CorporateUserRegisterAPIView.as_view()),
    path("logout", LogoutView.as_view(), name="knox_logout"),
]
Beispiel #29
0
from knox.views import LogoutView
from rest_framework import routers

from django.urls import path, include

from thumbnailer.views import ThumbnailViewSet
from .views import RegistrationAPI, LoginAPI, UserAPI

router = routers.DefaultRouter()
router.register(r'thumbnails', ThumbnailViewSet, r'thumbnails')

urlpatterns = [
    # Auth Endpoints
    path('auth/login/', LoginAPI.as_view(), name='login'),
    path('auth/logout/', LogoutView.as_view(), name='logout'),
    path('auth/register/', RegistrationAPI.as_view(), name='register'),

    # Apps Endpoints (Thumbnail and others)
    path('', include(router.urls)),
]
Beispiel #30
0
from django.urls import path, include
from knox.views import LogoutView
from rest_framework import routers
from .views import (UserView, RegisterView, LoginView, PasswordChangeView)

router = routers.DefaultRouter()
router.register(r'user', UserView, basename='user')

urlpatterns = [
    path('', include(router.urls)),
    path('auth/signup/', RegisterView.as_view()),
    path('auth/login/', LoginView.as_view()),
    path(
        'auth/logout/',
        LogoutView.as_view(),
    ),
    path('auth/password/change/',
         PasswordChangeView.as_view(),
         name='rest_password_change'),
]