daily pastebin goal
0%
SHARE
TWEET

urls

EulisAires Mar 20th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from django.conf import settings
  2. from django.conf.urls import url
  3. from django.conf.urls.static import static
  4. from django.contrib import admin
  5. from django.contrib.auth import views as auth_views
  6. from django.urls import path, include
  7.  
  8. from core.views import (RelatorioView,
  9.                         inspectionRegisterView,
  10.                         downloadDBView,
  11.                         inspectionListView,
  12.                         inspectionDetailView, get_models)
  13. from users.views import UserLoginView, UserLogoutView
  14.  
  15.  
  16.  
  17. urlpatterns = [
  18.     path('admin/', admin.site.urls),
  19.     path('', UserLoginView.as_view(), name='login'),
  20.     path('logout/', UserLogoutView.as_view(), name='logout'),
  21.     path('relatorio/', RelatorioView.as_view(), name='relatorio'),
  22.     path('cadastro_vistoria/', inspectionRegisterView.as_view(), name = 'register'),
  23.     path('download_banco_de_dados/', downloadDBView.as_view(), name='db'),
  24.     path('lista_de_vistorias/', inspectionListView.as_view(), name = 'list'),
  25.     path('vistoria/<int:pk>', inspectionDetailView.as_view(), name='inspection_detail'),
  26.     path('password_reset/', auth_views.password_reset, name='password_reset'),
  27.     path('password_reset_done', auth_views.password_reset_done, name='password_reset_done'),
  28.     path('reset/<uidb64>[0-9A-Za-z_\-]+)/<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/',
  29.         auth_views.password_reset_confirm, name='password_reset_confirm'),
  30.     path('reset/done/', auth_views.password_reset_complete, name='password_reset_complete'),
  31.     path('get_models/', get_models, name='get'),
  32.    
  33.    
  34. ]
  35.  
  36. if settings.DEBUG:
  37.     urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
  38.     urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top