diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae2c21a --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ +# Python +__pycache__/ +*.py[cod] +*.pyo +*.pyd +.Python + +# Virtual environment +venv/ +env/ +.venv/ + +# Django +*.sqlite3 +/media/ +/staticfiles/ + +# Environment variables +.env +.env.local + +# Claude Code workspace +.claude/ + +# IDE +.vscode/ +.idea/ +*.iml + +# OS +.DS_Store +Thumbs.db + +# Logs +*.log diff --git a/Plataform_Web/documentos/__pycache__/__init__.cpython-314.pyc b/Plataform_Web/documentos/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index b85ee5f..0000000 Binary files a/Plataform_Web/documentos/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/documentos/__pycache__/admin.cpython-314.pyc b/Plataform_Web/documentos/__pycache__/admin.cpython-314.pyc deleted file mode 100644 index 9ca0ba2..0000000 Binary files a/Plataform_Web/documentos/__pycache__/admin.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/documentos/__pycache__/apps.cpython-314.pyc b/Plataform_Web/documentos/__pycache__/apps.cpython-314.pyc deleted file mode 100644 index de968a1..0000000 Binary files a/Plataform_Web/documentos/__pycache__/apps.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/documentos/__pycache__/models.cpython-314.pyc b/Plataform_Web/documentos/__pycache__/models.cpython-314.pyc deleted file mode 100644 index b64606a..0000000 Binary files a/Plataform_Web/documentos/__pycache__/models.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/documentos/migrations/__pycache__/0001_initial.cpython-314.pyc b/Plataform_Web/documentos/migrations/__pycache__/0001_initial.cpython-314.pyc deleted file mode 100644 index 4266495..0000000 Binary files a/Plataform_Web/documentos/migrations/__pycache__/0001_initial.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/documentos/migrations/__pycache__/0002_factura_alter_documento_options_and_more.cpython-314.pyc b/Plataform_Web/documentos/migrations/__pycache__/0002_factura_alter_documento_options_and_more.cpython-314.pyc deleted file mode 100644 index 0cf2119..0000000 Binary files a/Plataform_Web/documentos/migrations/__pycache__/0002_factura_alter_documento_options_and_more.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/documentos/migrations/__pycache__/__init__.cpython-314.pyc b/Plataform_Web/documentos/migrations/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index f42726e..0000000 Binary files a/Plataform_Web/documentos/migrations/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/gades_manager/__pycache__/__init__.cpython-314.pyc b/Plataform_Web/gades_manager/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index df73379..0000000 Binary files a/Plataform_Web/gades_manager/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/gades_manager/__pycache__/settings.cpython-314.pyc b/Plataform_Web/gades_manager/__pycache__/settings.cpython-314.pyc deleted file mode 100644 index bb0af8e..0000000 Binary files a/Plataform_Web/gades_manager/__pycache__/settings.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/gades_manager/__pycache__/urls.cpython-314.pyc b/Plataform_Web/gades_manager/__pycache__/urls.cpython-314.pyc deleted file mode 100644 index 9a3c9eb..0000000 Binary files a/Plataform_Web/gades_manager/__pycache__/urls.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/gades_manager/__pycache__/wsgi.cpython-314.pyc b/Plataform_Web/gades_manager/__pycache__/wsgi.cpython-314.pyc deleted file mode 100644 index ed46cb3..0000000 Binary files a/Plataform_Web/gades_manager/__pycache__/wsgi.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/gades_manager/settings.py b/Plataform_Web/gades_manager/settings.py index b68ba68..a0536f4 100644 --- a/Plataform_Web/gades_manager/settings.py +++ b/Plataform_Web/gades_manager/settings.py @@ -135,3 +135,7 @@ AUTH_USER_MODEL = 'users.CustomUser' MEDIA_URL = '/media/' # La URL pública (ej: tudominio.com/media/archivo.pdf) MEDIA_ROOT = os.path.join(BASE_DIR, 'media') # La carpeta física en tu ordenador + +LOGIN_URL = 'login' +LOGIN_REDIRECT_URL = 'inicio' +LOGOUT_REDIRECT_URL = 'login' diff --git a/Plataform_Web/gades_manager/urls.py b/Plataform_Web/gades_manager/urls.py index 4818bc6..70e5474 100644 --- a/Plataform_Web/gades_manager/urls.py +++ b/Plataform_Web/gades_manager/urls.py @@ -17,13 +17,12 @@ Including another URLconf from django.contrib import admin from django.urls import path -from gestion import views # Importamos las vistas de la app donde guardaste la función +from django.contrib.auth import views as auth_views +from gestion import views urlpatterns = [ path('admin/', admin.site.urls), - - # Ruta raíz: cuando entres a la web, cargará directamente nuestro Dashboard - path('', views.inicio, name='inicio'), - - # Tus otras rutas de aplicaciones... + path('', views.inicio, name='inicio'), + path('login/', auth_views.LoginView.as_view(template_name='login.html'), name='login'), + path('logout/', auth_views.LogoutView.as_view(next_page='login'), name='logout'), ] \ No newline at end of file diff --git a/Plataform_Web/gestion/__pycache__/__init__.cpython-314.pyc b/Plataform_Web/gestion/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index de99138..0000000 Binary files a/Plataform_Web/gestion/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/gestion/__pycache__/admin.cpython-314.pyc b/Plataform_Web/gestion/__pycache__/admin.cpython-314.pyc deleted file mode 100644 index 2383af1..0000000 Binary files a/Plataform_Web/gestion/__pycache__/admin.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/gestion/__pycache__/apps.cpython-314.pyc b/Plataform_Web/gestion/__pycache__/apps.cpython-314.pyc deleted file mode 100644 index 1e5f9a8..0000000 Binary files a/Plataform_Web/gestion/__pycache__/apps.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/gestion/__pycache__/models.cpython-314.pyc b/Plataform_Web/gestion/__pycache__/models.cpython-314.pyc deleted file mode 100644 index 171f35c..0000000 Binary files a/Plataform_Web/gestion/__pycache__/models.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/gestion/__pycache__/views.cpython-314.pyc b/Plataform_Web/gestion/__pycache__/views.cpython-314.pyc deleted file mode 100644 index 3a3fa55..0000000 Binary files a/Plataform_Web/gestion/__pycache__/views.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/gestion/migrations/__pycache__/0001_initial.cpython-314.pyc b/Plataform_Web/gestion/migrations/__pycache__/0001_initial.cpython-314.pyc deleted file mode 100644 index 1c44640..0000000 Binary files a/Plataform_Web/gestion/migrations/__pycache__/0001_initial.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/gestion/migrations/__pycache__/0002_remove_patrocinador_contacto_equipo_and_more.cpython-314.pyc b/Plataform_Web/gestion/migrations/__pycache__/0002_remove_patrocinador_contacto_equipo_and_more.cpython-314.pyc deleted file mode 100644 index 23ba326..0000000 Binary files a/Plataform_Web/gestion/migrations/__pycache__/0002_remove_patrocinador_contacto_equipo_and_more.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/gestion/migrations/__pycache__/__init__.cpython-314.pyc b/Plataform_Web/gestion/migrations/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 105c58e..0000000 Binary files a/Plataform_Web/gestion/migrations/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/pruebas/__pycache__/__init__.cpython-314.pyc b/Plataform_Web/pruebas/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 93977f1..0000000 Binary files a/Plataform_Web/pruebas/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/pruebas/__pycache__/admin.cpython-314.pyc b/Plataform_Web/pruebas/__pycache__/admin.cpython-314.pyc deleted file mode 100644 index bfe8d02..0000000 Binary files a/Plataform_Web/pruebas/__pycache__/admin.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/pruebas/__pycache__/apps.cpython-314.pyc b/Plataform_Web/pruebas/__pycache__/apps.cpython-314.pyc deleted file mode 100644 index 85ee72a..0000000 Binary files a/Plataform_Web/pruebas/__pycache__/apps.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/pruebas/__pycache__/models.cpython-314.pyc b/Plataform_Web/pruebas/__pycache__/models.cpython-314.pyc deleted file mode 100644 index 5a56fd1..0000000 Binary files a/Plataform_Web/pruebas/__pycache__/models.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/pruebas/migrations/__pycache__/0001_initial.cpython-314.pyc b/Plataform_Web/pruebas/migrations/__pycache__/0001_initial.cpython-314.pyc deleted file mode 100644 index a646e4f..0000000 Binary files a/Plataform_Web/pruebas/migrations/__pycache__/0001_initial.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/pruebas/migrations/__pycache__/0002_prueba_telemetria_variable_delete_testgeneral.cpython-314.pyc b/Plataform_Web/pruebas/migrations/__pycache__/0002_prueba_telemetria_variable_delete_testgeneral.cpython-314.pyc deleted file mode 100644 index 91a8eb9..0000000 Binary files a/Plataform_Web/pruebas/migrations/__pycache__/0002_prueba_telemetria_variable_delete_testgeneral.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/pruebas/migrations/__pycache__/__init__.cpython-314.pyc b/Plataform_Web/pruebas/migrations/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index f951627..0000000 Binary files a/Plataform_Web/pruebas/migrations/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/templates/base.html b/Plataform_Web/templates/base.html index cc0cf0a..93233b2 100644 --- a/Plataform_Web/templates/base.html +++ b/Plataform_Web/templates/base.html @@ -11,8 +11,11 @@ {% block extra_head %}{% endblock extra_head %} + - + -
+
{% block content %} {% endblock content %}
diff --git a/Plataform_Web/templates/index.html b/Plataform_Web/templates/index.html index 4146b64..4a606a4 100644 --- a/Plataform_Web/templates/index.html +++ b/Plataform_Web/templates/index.html @@ -4,9 +4,9 @@ {% block title %}Inicio | Gades Manager{% endblock title %} {% block content %} -
+
-
+

Bienvenido, {{ user.first_name }} {{ user.last_name }}

Panel de control de la plataforma de gestión interna.

@@ -20,12 +20,12 @@
-
- -
-
- Monoplaza Formula Gades +
+ +
+
+ Monoplaza Formula Gades
diff --git a/Plataform_Web/templates/login.html b/Plataform_Web/templates/login.html new file mode 100644 index 0000000..3c6b2c1 --- /dev/null +++ b/Plataform_Web/templates/login.html @@ -0,0 +1,101 @@ +{% load static %} + + + + + + Iniciar Sesión | Formula Gades + + + + + + + + + + + + diff --git a/Plataform_Web/temporadas/__pycache__/__init__.cpython-314.pyc b/Plataform_Web/temporadas/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 73d6bbc..0000000 Binary files a/Plataform_Web/temporadas/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/temporadas/__pycache__/admin.cpython-314.pyc b/Plataform_Web/temporadas/__pycache__/admin.cpython-314.pyc deleted file mode 100644 index c681e16..0000000 Binary files a/Plataform_Web/temporadas/__pycache__/admin.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/temporadas/__pycache__/apps.cpython-314.pyc b/Plataform_Web/temporadas/__pycache__/apps.cpython-314.pyc deleted file mode 100644 index be03dbf..0000000 Binary files a/Plataform_Web/temporadas/__pycache__/apps.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/temporadas/__pycache__/models.cpython-314.pyc b/Plataform_Web/temporadas/__pycache__/models.cpython-314.pyc deleted file mode 100644 index d51e4dd..0000000 Binary files a/Plataform_Web/temporadas/__pycache__/models.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/temporadas/migrations/__pycache__/0001_initial.cpython-314.pyc b/Plataform_Web/temporadas/migrations/__pycache__/0001_initial.cpython-314.pyc deleted file mode 100644 index 44398ca..0000000 Binary files a/Plataform_Web/temporadas/migrations/__pycache__/0001_initial.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/temporadas/migrations/__pycache__/0002_temporada_miembros.cpython-314.pyc b/Plataform_Web/temporadas/migrations/__pycache__/0002_temporada_miembros.cpython-314.pyc deleted file mode 100644 index 9c4ed0a..0000000 Binary files a/Plataform_Web/temporadas/migrations/__pycache__/0002_temporada_miembros.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/temporadas/migrations/__pycache__/__init__.cpython-314.pyc b/Plataform_Web/temporadas/migrations/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 8b932b4..0000000 Binary files a/Plataform_Web/temporadas/migrations/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/users/__pycache__/__init__.cpython-314.pyc b/Plataform_Web/users/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index 7f6fa4d..0000000 Binary files a/Plataform_Web/users/__pycache__/__init__.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/users/__pycache__/admin.cpython-314.pyc b/Plataform_Web/users/__pycache__/admin.cpython-314.pyc deleted file mode 100644 index 5f5d836..0000000 Binary files a/Plataform_Web/users/__pycache__/admin.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/users/__pycache__/apps.cpython-314.pyc b/Plataform_Web/users/__pycache__/apps.cpython-314.pyc deleted file mode 100644 index 4ee0e1e..0000000 Binary files a/Plataform_Web/users/__pycache__/apps.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/users/__pycache__/models.cpython-314.pyc b/Plataform_Web/users/__pycache__/models.cpython-314.pyc deleted file mode 100644 index 8a163f4..0000000 Binary files a/Plataform_Web/users/__pycache__/models.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/users/migrations/__pycache__/0001_initial.cpython-314.pyc b/Plataform_Web/users/migrations/__pycache__/0001_initial.cpython-314.pyc deleted file mode 100644 index 725f115..0000000 Binary files a/Plataform_Web/users/migrations/__pycache__/0001_initial.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/users/migrations/__pycache__/0002_alter_customuser_especialidad_alter_customuser_rol.cpython-314.pyc b/Plataform_Web/users/migrations/__pycache__/0002_alter_customuser_especialidad_alter_customuser_rol.cpython-314.pyc deleted file mode 100644 index 8d347ce..0000000 Binary files a/Plataform_Web/users/migrations/__pycache__/0002_alter_customuser_especialidad_alter_customuser_rol.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/users/migrations/__pycache__/0003_alter_customuser_especialidad_alter_customuser_rol.cpython-314.pyc b/Plataform_Web/users/migrations/__pycache__/0003_alter_customuser_especialidad_alter_customuser_rol.cpython-314.pyc deleted file mode 100644 index e521688..0000000 Binary files a/Plataform_Web/users/migrations/__pycache__/0003_alter_customuser_especialidad_alter_customuser_rol.cpython-314.pyc and /dev/null differ diff --git a/Plataform_Web/users/migrations/__pycache__/__init__.cpython-314.pyc b/Plataform_Web/users/migrations/__pycache__/__init__.cpython-314.pyc deleted file mode 100644 index be754e9..0000000 Binary files a/Plataform_Web/users/migrations/__pycache__/__init__.cpython-314.pyc and /dev/null differ