"""biblioteca URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.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 django.contrib.auth.decorators import login_required from apps.libro.views import Inicio from apps.usuario.views import Login, logoutUsuario urlpatterns = [ path('admin/', admin.site.urls), path('usuarios/', include(('apps.usuario.urls', 'usuarios'))), path('libro/', include(('apps.libro.urls', 'libro'))), path('', login_required(Inicio.as_view()), name='index'), path('accounts/login/', Login.as_view(), name='login'), path('logout/', login_required(logoutUsuario), name='logout'), ]
from django.urls import path from apps.usuario.views import Login, RegisterUser, index, ShowUser, DeleteUser, UpdateUser, Logout, Reset, ResetDone, \ ResetConfirm, ResetComplete app_name = 'usuario' urlpatterns = [ path('', index, name='index'), path('list', ShowUser.as_view(), name='list'), path('login/', Login.as_view(), name='login'), path('logout/', Logout.as_view(), name='logout'), path('register/', RegisterUser.as_view(), name='register'), path('<int:pk>/edit_user', UpdateUser.as_view(), name='edit_user'), path('<int:pk>/delete_user', DeleteUser.as_view(), name='delete_user'), path('reset/password/', Reset.as_view(), name='password_reset'), path('reset/password/done/', ResetDone.as_view(), name='password_reset_done'), path('reset/<uidb64>/<token>/', ResetConfirm.as_view(), name='password_reset_confirm'), path('reset/complete/', ResetComplete.as_view(), name='password_reset_complete'), ]
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 apps.usuario.views import Login, Logout urlpatterns = [ path('admin/', admin.site.urls), path('', include('apps.app-urls.navegacion-urls.urls')), # path('producto/',include('apps.app-urls.producto-urls.urls', namespace='productos')), # path('configuracion/',include('apps.app-urls.configuracion-urls.urls', namespace='configuracion')), path('almacen/', include('apps.app-urls.almacen-urls.urls', namespace='almacen')), path('taller/', include('apps.app-urls.taller-urls.urls', namespace='taller')), path('producto/', include('apps.app-urls.producto-urls.urls', namespace='productos')), path('login/', Login.as_view()), path('logout/', Logout.as_view()), ] admin.site.site_header = 'Administrador BACKEND Real Star' admin.site.site_title = "Interface web del administrador"
from django.urls import path from django.contrib.auth.views import LogoutView from apps.usuario.views import Login urlpatterns = [ path('login', Login.as_view(), name="login"), path('logout', LogoutView.as_view(), name="logout"), ]
from django.urls import path from apps.usuario.views import Login, logoutUsuario from apps.secretaria.views import home_secretary from apps.base.views import home_surgeon from apps.doctor.views import home_doctor from django.contrib.auth.views import LoginView, LogoutView from django.contrib.auth.decorators import login_required urlpatterns = [ path('', Login.as_view(), name='Login'), path('logout/', logoutUsuario, name='logout'), path('base/Index', home_surgeon, name='Index'), path('secretaria/Index', home_secretary, name='Index1'), path('doctor/Index', home_doctor, name='Index2'), ]