From 545df9a2280f5a515d577fea81849201f1b809c1 Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Mon, 12 Aug 2024 14:47:00 +0200 Subject: [PATCH] Cambios en urls de accounts --- Libros/biblioteca/accounts/urls.py | 3 + Libros/biblioteca/biblioteca/urls.py | 4 +- .../gestion/templates/registration/login.html | 113 ++++++++++++------ .../templates/registration/signup.html | 3 +- 4 files changed, 83 insertions(+), 40 deletions(-) diff --git a/Libros/biblioteca/accounts/urls.py b/Libros/biblioteca/accounts/urls.py index fac987a..52f72bf 100644 --- a/Libros/biblioteca/accounts/urls.py +++ b/Libros/biblioteca/accounts/urls.py @@ -1,9 +1,12 @@ # accounts/urls.py from django.urls import path +from django.contrib.auth import views as auth_views from .views import SignUpView urlpatterns = [ path("signup/", SignUpView.as_view(), name="signup"), + path('login/', auth_views.LoginView.as_view(), name='login'), + path('logout/', auth_views.LogoutView.as_view(), name='logout'), ] \ No newline at end of file diff --git a/Libros/biblioteca/biblioteca/urls.py b/Libros/biblioteca/biblioteca/urls.py index ca60ff3..a49712d 100644 --- a/Libros/biblioteca/biblioteca/urls.py +++ b/Libros/biblioteca/biblioteca/urls.py @@ -18,7 +18,6 @@ from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static -from django.contrib.auth import views as auth_views from django.views.generic.base import TemplateView # new urlpatterns = [ @@ -26,8 +25,7 @@ urlpatterns = [ path('gestion/', include('gestion.urls')), path("accounts/", include("accounts.urls")), # new - path('accounts/login/', auth_views.LoginView.as_view(), name='login'), - path('accounts/logout/', auth_views.LogoutView.as_view(), name='logout'), + path("accounts/", include("django.contrib.auth.urls")), path("", TemplateView.as_view(template_name="gestion/index.html"), name="principal"), # new diff --git a/Libros/biblioteca/gestion/templates/registration/login.html b/Libros/biblioteca/gestion/templates/registration/login.html index ea585ef..2a94cfe 100644 --- a/Libros/biblioteca/gestion/templates/registration/login.html +++ b/Libros/biblioteca/gestion/templates/registration/login.html @@ -1,3 +1,5 @@ +{% load i18n static %} + {% include "_head.html" %} @@ -7,43 +9,82 @@
{% include "_branding.html" %}

Entrar en Lyrics

-
- - -
- - {% include "_footer.html" %} - -
- -
-
-
-
-
-
-
- -
-
-
- - + + + +
¿No tienes cuenta? Registrate aquí.
+ + + {% include "_footer.html" %} + + +
+
+
+
+
+
+
+ +
+
+
+ - + \ No newline at end of file diff --git a/Libros/biblioteca/gestion/templates/registration/signup.html b/Libros/biblioteca/gestion/templates/registration/signup.html index e5fa02b..2267470 100644 --- a/Libros/biblioteca/gestion/templates/registration/signup.html +++ b/Libros/biblioteca/gestion/templates/registration/signup.html @@ -14,7 +14,8 @@
{% csrf_token %} {{ form }} -
+
+