from django.conf.urls import url from rest_framework_jwt.views import obtain_jwt_token from accounts import views from accounts.views import UserView, auth_register app_name = 'accounts' urlpatterns = [ url(r'^register/$', views.auth_register, name='register'), url(r'^profile/', views.auth_profile, name='profile'), url(r'^login/', views.auth_login, name='login'), url(r'^logout/', views.auth_logout, name='logout'), url(r'^test/', views.test, name='test'), url(r'^register_api/$', UserView.as_view()), # provide email and password # JWT based on the username(email) and password url(r'^api-token-auth/$', obtain_jwt_token) # provide email and password ]
from django.conf.urls import url from rest_framework_jwt.views import obtain_jwt_token from accounts.views import UserView urlpatterns = [ url(r'^register/$', UserView.as_view()), url(r'^api-token-auth/$', obtain_jwt_token) ]
from django.conf.urls import url from rest_framework_jwt.views import obtain_jwt_token from accounts.views import UserView urlpatterns = [ url(r"^register/$", UserView.as_view()), url(r"^api-token-auth/$", obtain_jwt_token) ]
from rest_framework import routers router = routers.DefaultRouter() router.register(r'training', TrainingsViewSet, base_name='training') router.register(r'register-user', UserRegisterViewSet, base_name='register-user') urlpatterns = [ url(r'^extend_notifications/$', NotificationList.as_view(), name='notification-list'), ] urlpatterns = format_suffix_patterns(urlpatterns, allowed=['json', 'api']) rest_v1_patterns = [ url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')), url(r'^user/$', UserView.as_view()), url(r'^user/day_week/$', DayWeekAPI.as_view()), url(r'^user/info/$', AthleteAPI.as_view()), url(r'^user/all_info/$', AthleteAllDataAPI.as_view()), url(r'^user/target/$', TargetPriorityAPI.as_view()), url(r'^user/zone/$', ZonePriorityAPI.as_view()), url(r'^routed/', include(router.urls)), ] api_patterns = [ url(r'^v1/', include(rest_v1_patterns)), ]
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 include, url from django.contrib import admin from django.views.generic import TemplateView from items.views import ItemView, OfferView, UploadView from accounts.views import AccountView, UserView urlpatterns = [ url(r'^items', ItemView.as_view()), url(r'^upload', UploadView.as_view(), name="upload"), url(r'^accounts', AccountView.as_view()), url(r'^login', AccountView.as_view()), url(r'^users', UserView.as_view()), url(r'^signup', UserView.as_view()), url(r'^admin/', admin.site.urls) ] from django.conf import settings from django.views.static import serve if settings.DEBUG: urlpatterns += [ url(r'^media/(?P<path>.*)$', serve, { 'document_root': settings.MEDIA_ROOT, }), ]
from .views import NotificationList, DayWeekAPI, UserRegisterViewSet from accounts.views import UserView from athletes.views import AthleteAPI, ZonePriorityAPI, TargetPriorityAPI, AthleteAllDataAPI from trainings.views import TrainingsViewSet from rest_framework import routers router = routers.DefaultRouter() router.register(r'training', TrainingsViewSet, base_name='training') router.register(r'register-user', UserRegisterViewSet, base_name='register-user') urlpatterns = [ url(r'^extend_notifications/$', NotificationList.as_view(), name='notification-list'), ] urlpatterns = format_suffix_patterns(urlpatterns, allowed=['json', 'api']) rest_v1_patterns = [ url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')), url(r'^user/$', UserView.as_view()), url(r'^user/day_week/$', DayWeekAPI.as_view()), url(r'^user/info/$', AthleteAPI.as_view()), url(r'^user/all_info/$', AthleteAllDataAPI.as_view()), url(r'^user/target/$', TargetPriorityAPI.as_view()), url(r'^user/zone/$', ZonePriorityAPI.as_view()), url(r'^routed/', include(router.urls)), ] api_patterns = [ url(r'^v1/', include(rest_v1_patterns)), ]
from django.urls import path from accounts.views import register_view, UserDetailView, UserView, UserUpdateView, UserChangePasswordView from django.contrib.auth.views import LoginView, LogoutView urlpatterns = [ path('login/', LoginView.as_view(), name='login'), path('logout/', LogoutView.as_view(), name='logout'), path('registration/', register_view, name='register'), path('index/', UserView.as_view(), name='index_accounts'), path('<int:id>/', UserDetailView.as_view(), name='all_accounts'), path('profile/', UserUpdateView.as_view(), name='update_user'), path('profile/change-password', UserChangePasswordView.as_view(), name='change_password'), ]
viewset=GMScreenTabViewSet, base_name='gmscreentab') router.register(prefix='statblock', viewset=StatblockViewSet, base_name='statblock') router.register(prefix='creatureprop', viewset=CreaturePropViewSet, base_name='creatureprop') router.register(prefix='statblockprop', viewset=StatblockPropViewSet, base_name='statblockprop') urlpatterns = [ path('api/', include(router.urls)), path('api/token-auth/', login_view, name='token-auth'), path('api/request-user/', UserView.as_view(), name='request-user-detail'), path('api/signup/', signup_view, name='api-signup'), path('api/password-validate/', check_password_strength, name='password-reqs'), path('api/spotify-auth/', spotify_auth, name='spotify-auth'), ] urlpatterns += [ # have a final fallback that matches anything that ends in /, send it to vue-router # if it doesn't end in /, APPEND_SLASH django setting causes it to be re-run with # a / appended; if a match is found, sends a redirect to the /-appended url re_path(r'^(.*/$|$)', TemplateView.as_view(template_name='index.html'), name='app'), ]
from django.urls import path, include from rest_framework.decorators import throttle_classes from rest_framework.authtoken.views import obtain_auth_token from rest_framework.routers import DefaultRouter from accounts.routers import router from accounts.views import (SignUpView, LoginView, UserView, ChangePassword) app_name = 'accounts' urlpatterns = [ path('signup/', SignUpView.as_view(), name='signup'), path('login/', LoginView.as_view(), name='login'), path('change-password/<int:pk>/', ChangePassword.as_view(), name='change_password'), path('user/', UserView.as_view(), name='user'), path('', include(router.urls)) ]
from django.urls import path, include from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView, ) from accounts.views import RegisterView, UserView urlpatterns = [ path('auth/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('auth/refresh/', TokenRefreshView.as_view(), name='token_refresh'), path('user/register/', RegisterView.as_view(), name='register_user'), path('user/', UserView.as_view(), name="user") ]
UserSearchView, UserView, UUIDIntrospectTokenView, ) app_name = "accounts" router = routers.SimpleRouter() router.register("me/phonenumber", PhoneNumberViewSet, basename="me-phonenumber") router.register("me/email", EmailViewSet, basename="me-email") router.register("majors", MajorViewSet, basename="majors") router.register("schools", SchoolViewSet, basename="schools") FinalLoginView = DevLoginView if settings.IS_DEV_LOGIN else LoginView FinalLogoutView = DevLogoutView if settings.IS_DEV_LOGIN else LogoutView urlpatterns = [ path("login/", FinalLoginView.as_view(), name="login"), path("logout/", FinalLogoutView.as_view(), name="logout"), path("me/", UserView.as_view(), name="me"), path("search/", UserSearchView.as_view(), name="search"), path("authorize/", AuthorizationView.as_view(), name="authorize"), path("token/", TokenView.as_view(), name="token"), path("introspect/", UUIDIntrospectTokenView.as_view(), name="introspect"), path("productadmin/", ProductAdminView.as_view(), name="productadmin"), ] urlpatterns += router.urls
from django.urls import re_path from django.contrib.auth import views from accounts.views import LoginView, RegisterView, UserView, UserEditView, \ save_photo_user, delete_photo_user urlpatterns = [ re_path(r'^login/$', LoginView.as_view(), name='login'), re_path(r'^logout/$', views.logout, {'next_page': 'login'}, name='logout'), re_path(r'^register/$', RegisterView.as_view(), name='register'), re_path(r'^user/(?P<pk>[0-9]+)/$', UserView.as_view(), name='user_view'), re_path(r'^user/(?P<pk>[0-9]+)/edit/$', UserEditView.as_view(), name='user_edit'), re_path(r'^save_photo_user/(?P<pk>[0-9]+)/$', save_photo_user, name='save_photo_user'), re_path(r'^delete_photo_user/(?P<pk>[0-9]+)/$', delete_photo_user, name='delete_photo_user'), ]
from django.urls import path from knox import views as knox_views from accounts.views import RegisterView from accounts.views import LoginView from accounts.views import UserView urlpatterns = [ 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', knox_views.LogoutView.as_view(), name='knox_logout'), ]
from django.urls import path, include from django.views.generic import RedirectView from accounts import views as user_views from django.contrib.auth import views as auth_views from accounts.views import UserRegisterView, UserBlog, UserFollower, UserView # from blog.views import UserListView from .views import ( UserDetailView, UserFollowView, ) urlpatterns = [ path('', include('django.contrib.auth.urls')), path('search/', UserView.as_view(), name='user_list'), path('register/', UserRegisterView.as_view(), name='register'), path('login/', auth_views.LoginView.as_view(template_name='registration/login.html'), name='login'), path('profile/', user_views.profile, name='profile'), path('<username>/', UserDetailView.as_view(), name='account_detail'), path('<username>/follow/', UserFollowView.as_view(), name='follow'), path('<username>/following/', UserFollower.as_view(), name='following'),# users whom i following path('<username>/blog/', UserBlog.as_view(), name='user_blog'), ]
from accounts.views import UserView, SubscriptionView from config.settings import API_VERSION from django.conf.urls import url urlpatterns = [ url(r'(?P<pk>[0-9]+)/$', UserView.as_view()), url(r'update/(?P<pk>[0-9]+)/$', UserView.as_view()), url(r'subscribe/$', UserView.as_view()), url(r'cancel_subscription/(?P<pk>[0-9]+)/$', UserView.as_view()), ]
from django.urls import path from django.contrib.auth.views import LoginView, LogoutView from accounts.views import RegisterView, UserDetailView, UserView, UserChangeView, UserPasswordChangeView app_name = 'accounts' urlpatterns = [ path('login/', LoginView.as_view(), name='login'), path('logout/', LogoutView.as_view(), name='logout'), path('register/', RegisterView.as_view(), name='create'), path('<int:pk>/', UserDetailView.as_view(), name='detail'), path('users/', UserView.as_view(), name='user_view'), path('<int:pk>/change/', UserChangeView.as_view(), name='change'), path('<int:pk>/password_change/', UserPasswordChangeView.as_view(), name='password_change'), ]
"""Url patterns for the accounts app.""" __all__ = ("urlpatterns", ) from django.urls import path from rest_framework.routers import SimpleRouter from accounts.views import UserView from accounts.views import AccountViewSet from accounts.views import LogoutView, LoginView from accounts.views import RegisterEmployerViewSet from accounts.views import RegisterEmployeesViewSet router = SimpleRouter() router.register("account", AccountViewSet, "account") router.register("register-employers", RegisterEmployerViewSet, "register-employers") router.register("register-employees", RegisterEmployeesViewSet, "register-employees") urlpatterns = router.urls + [ path("user/", UserView.as_view(), name="user"), path("login/", LoginView.as_view(), name="login"), path("logout/", LogoutView.as_view(), name="logout"), ]
name='view_profile_with_pk'), url(r'^profile/edit/$', views.edit_profile, name='edit_profile'), url(r'^change-password/$', views.change_password, name='change_password'), url(r'^reset-password/$', password_reset, { 'template_name': 'accounts/reset_password.html', 'post_reset_redirect': 'accounts:password_reset_done', 'email_template_name': 'accounts/reset_password_email.html' }, name='reset_password'), url(r'^reset-password/done/$', password_reset_done, {'template_name': 'accounts/reset_password_done.html'}, name='password_reset_done'), url(r'^reset-password/confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$', password_reset_confirm, { 'template_name': 'accounts/reset_password_confirm.html', 'post_reset_redirect': 'accounts:password_reset_complete' }, name='password_reset_confirm'), url(r'^reset-password/complete/$', password_reset_complete, {'template_name': 'accounts/reset_password_complete.html'}, name='password_reset_complete'), url(r'^connect/(?P<operation>.+)/(?P<pk>\d+)/$', views.change_friends, name='change_friends'), url(r'^$', HomeView.as_view(), name='home'), url(r'^user$', UserView.as_view(), name='user'), ]