from django.conf.urls import url from myapp.views import LoginView, LogoutView, movies_list from rest_framework.schemas import get_schema_view from rest_framework_simplejwt import views as jwt_views urlpatterns = [ url('api/movies$', movies_list), url('api/vl/auth/login/', LoginView.as_view()), url('api/vl/auth/logout/', LogoutView.as_view()), url('api/token/', jwt_views.TokenObtainPairView.as_view(), name='token_obtain_pair'), url('api/token/refresh/', jwt_views.TokenRefreshView.as_view(), name='token_refresh'), ]
"""csa 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.contrib import admin from django.urls import path from rest_framework_jwt.views import obtain_jwt_token # local imports from myapp.views import RegisterView, LoginView, ProfileView, EditView urlpatterns = [ path('admin/', admin.site.urls), path('api/register/', RegisterView.as_view(), name='register'), path('api/login/', LoginView.as_view(), name='login'), path('api/profile/', ProfileView.as_view(), name='profile'), path('api/edit/', EditView.as_view(), name='edit') ]
"""day3 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/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.contrib import admin from django.urls import path, include from myapp.views import (IndexView, TinhToanView, LoginView, FormView, ViewBaiViet, ListBaiViet) urlpatterns = [ path('admin/', admin.site.urls), path('', IndexView.as_view(), name="index_views"), path('tinhtoan/', TinhToanView.as_view(), name='tinh_toan'), path('login/', LoginView.as_view(), name='login_url'), path('form/', FormView.as_view(), name='form_url'), path('a/', include('myapp.urls')), path('post/<slugg>/', ViewBaiViet.as_view(), name='post_detail'), path('post/', ListBaiViet.as_view()) ]
from django.urls import path from myapp.views import(Register, LoginView, ProfileDetail, UserUpdateView, logout_view, UsersList, addFriend, removeRequest) from django.conf.urls.static import static from django.conf import settings app_name = "myapp" urlpatterns = [ path("register/", Register.as_view(), name="register"), path("login/", LoginView.as_view(), name="login"), path("profile/<int:pk>", ProfileDetail.as_view(), name="profile"), path("profile/editprofile/<int:pk>", UserUpdateView.as_view(), name="editprofile"), path("logout/", logout_view, name="logout"), path("people/", UsersList.as_view(), name="people"), path("people/add/<int:pk>", addFriend, name="addfriend"), path("people/removerequest/<int:pk>", removeRequest, name="removerequest"), ] urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.urls import path from myapp.views import HomeView, SignupView, LoginView, AboutView, ServiceView, user_logout, FaqView, SettingsView, ContactView urlpatterns = [ path('', HomeView.as_view(), name='home'), path('signup', SignupView.as_view(), name='signup'), path('login', LoginView.as_view(), name='login'), path('about', AboutView.as_view(), name='about'), path('services', ServiceView.as_view(), name='services'), path('faq', FaqView.as_view(), name='faq'), path('setting', SettingsView.as_view(), name='setting'), path('contact', ContactView.as_view(), name='contact'), path('user_logout', user_logout, name='user_logout') ]
publication, language, education, additional_info, recommendations, delete_document, delete_image, delete_video, ) # Routers provide an easy way of automatically determining the URL conf. router = routers.SimpleRouter() router.register(r'accounts', UserViewSet) #/api/v1/accounts/ urlpatterns = [ url(r'^api/v1/auth/logout/$', LogoutView.as_view()), url(r'^api/v1/auth/login/$', LoginView.as_view()), url(r'^api/v1/', include(router.urls)), url(r'^admin/', admin.site.urls), url(r'^linkedin_login$', linkedin_login.as_view()), url(r'^google_login$', google_login.as_view()), # url(r'^login$',login.as_view()), #url(r'^insert_user$',insert_user), url(r'^logout$', logout), url(r'^fileUpload$', fileUpload), url(r'^file_retrieve_documents$', file_retrieve_documents), url(r'^file_retrieve_images$', file_retrieve_images), url(r'^file_retrieve_videos$', file_retrieve_videos), url(r'^linkUpload$', linkUpload), url(r'^get_cover_images$', get_cover_images), url(r'^experience$', experience.as_view()), url(r'^summary$', summary.as_view()),
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.contrib import admin from django.urls import path from myapp.views import IndexView, FormView, FormConfirView, LoginView, RegisterView, UserProfileView, \ updateuserprofileview, EmailVerifyView, RequestPasswordResetEmailView, CompletePasswordReset, EmailSendContactView from django.contrib.auth import views as auth_views urlpatterns = [ path('admin/', admin.site.urls), path('', IndexView.as_view(), name="indexpage"), path('form', FormView.as_view(), name="formpage"), path('form-confirmation', FormConfirView.as_view(), name="formconfirmationpage"), path('login/', LoginView.as_view(), name="login"), path('logout/', auth_views.LogoutView.as_view(), name="logout"), path('register', RegisterView.as_view(), name="register"), path('user', UserProfileView.as_view(), name="userprofile"), path('update-user', updateuserprofileview, name="updateuserprofile"), path('email-verify/<uidb64>/<token>', EmailVerifyView.as_view(), name="emailverify"), path('set-new-password/<uidb64>/<token>', CompletePasswordReset.as_view(), name="reset-user-password"), path('reset-password', RequestPasswordResetEmailView.as_view(), name="resetpassword"), path('send-email', EmailSendContactView.as_view(), name="sendemail"), ]
from django.urls import re_path from myapp.views import LoginView, HomeView, LogoutView urlpatterns = [ re_path(r'^$', LoginView.as_view(), name='login'), re_path(r'^/home/(?P<username>\w+)/$', HomeView.as_view(), name='home'), re_path(r'^/home/(?P<username>\w+)/logout/$', LogoutView.as_view(), name='logout'), ]