diff --git a/cosiap_api/administracion/__init__.py b/cosiap_api/administracion/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/cosiap_api/administracion/admin.py b/cosiap_api/administracion/admin.py new file mode 100644 index 0000000000000000000000000000000000000000..8c38f3f3dad51e4585f3984282c2a4bec5349c1e --- /dev/null +++ b/cosiap_api/administracion/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/cosiap_api/administracion/apps.py b/cosiap_api/administracion/apps.py new file mode 100644 index 0000000000000000000000000000000000000000..7b463d7bac1087ce81a25bf520c450352169f955 --- /dev/null +++ b/cosiap_api/administracion/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class AdminConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'administracion' diff --git a/cosiap_api/administracion/migrations/__init__.py b/cosiap_api/administracion/migrations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/cosiap_api/administracion/models.py b/cosiap_api/administracion/models.py new file mode 100644 index 0000000000000000000000000000000000000000..71a836239075aa6e6e4ecb700e9c42c95c022d91 --- /dev/null +++ b/cosiap_api/administracion/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/cosiap_api/administracion/tests.py b/cosiap_api/administracion/tests.py new file mode 100644 index 0000000000000000000000000000000000000000..7ce503c2dd97ba78597f6ff6e4393132753573f6 --- /dev/null +++ b/cosiap_api/administracion/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/cosiap_api/administracion/urls.py b/cosiap_api/administracion/urls.py new file mode 100644 index 0000000000000000000000000000000000000000..3a22da478ea564aab4442816d6abaacb0a8f80a7 --- /dev/null +++ b/cosiap_api/administracion/urls.py @@ -0,0 +1,7 @@ +from . import views +from django.urls import path +from django.contrib.auth import views as auth_views + + +app_name = 'administracion' +urlpatterns = [] \ No newline at end of file diff --git a/cosiap_api/administracion/views.py b/cosiap_api/administracion/views.py new file mode 100644 index 0000000000000000000000000000000000000000..91ea44a218fbd2f408430959283f0419c921093e --- /dev/null +++ b/cosiap_api/administracion/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/cosiap_api/cosiap_api/settings.py b/cosiap_api/cosiap_api/settings.py index 68e6856919d39872737e0f22c40c40256587c004..aa384da052d74d282362ac62ab7a0556dc5e2c5f 100644 --- a/cosiap_api/cosiap_api/settings.py +++ b/cosiap_api/cosiap_api/settings.py @@ -47,6 +47,13 @@ INSTALLED_APPS = [ 'drf_spectacular', 'corsheaders', 'users', + 'administracion', + 'dynamic_formats', + 'dynamic_forms', + 'dynamic_tables', + 'modalidades', + 'notificaciones', + 'solicitudes', ] MIDDLEWARE = [ diff --git a/cosiap_api/cosiap_api/urls.py b/cosiap_api/cosiap_api/urls.py index 7d69109e2d890b25f7ea4e52f778f69cab8ec371..d9305b702f8bfb6dff08ca1ed3ca4bc77b3a83cd 100644 --- a/cosiap_api/cosiap_api/urls.py +++ b/cosiap_api/cosiap_api/urls.py @@ -23,6 +23,10 @@ from drf_spectacular.views import SpectacularAPIView, SpectacularRedocView, Spec urlpatterns = [ path('admin/', admin.site.urls), path('api/usuarios/',include('users.urls')), + path('api/administracion/',include('administracion.urls')), + path('api/modalidades/',include('modalidades.urls')), + path('api/notificaciones/',include('notificaciones.urls')), + path('api/solicitudes/',include('solicitudes.urls')), # API Doc UI: path('api/schema/', SpectacularAPIView.as_view(), name='schema'), diff --git a/cosiap_api/dynamic_formats/__init__.py b/cosiap_api/dynamic_formats/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/cosiap_api/dynamic_formats/admin.py b/cosiap_api/dynamic_formats/admin.py new file mode 100644 index 0000000000000000000000000000000000000000..8c38f3f3dad51e4585f3984282c2a4bec5349c1e --- /dev/null +++ b/cosiap_api/dynamic_formats/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/cosiap_api/dynamic_formats/apps.py b/cosiap_api/dynamic_formats/apps.py new file mode 100644 index 0000000000000000000000000000000000000000..c41dbdf54d0fd99dd094329183d74cc623500022 --- /dev/null +++ b/cosiap_api/dynamic_formats/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class DynamicFormatsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'dynamic_formats' diff --git a/cosiap_api/dynamic_formats/migrations/__init__.py b/cosiap_api/dynamic_formats/migrations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/cosiap_api/dynamic_formats/models.py b/cosiap_api/dynamic_formats/models.py new file mode 100644 index 0000000000000000000000000000000000000000..71a836239075aa6e6e4ecb700e9c42c95c022d91 --- /dev/null +++ b/cosiap_api/dynamic_formats/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/cosiap_api/dynamic_formats/tests.py b/cosiap_api/dynamic_formats/tests.py new file mode 100644 index 0000000000000000000000000000000000000000..7ce503c2dd97ba78597f6ff6e4393132753573f6 --- /dev/null +++ b/cosiap_api/dynamic_formats/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/cosiap_api/dynamic_formats/views.py b/cosiap_api/dynamic_formats/views.py new file mode 100644 index 0000000000000000000000000000000000000000..91ea44a218fbd2f408430959283f0419c921093e --- /dev/null +++ b/cosiap_api/dynamic_formats/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/cosiap_api/dynamic_forms/__init__.py b/cosiap_api/dynamic_forms/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/cosiap_api/dynamic_forms/admin.py b/cosiap_api/dynamic_forms/admin.py new file mode 100644 index 0000000000000000000000000000000000000000..8c38f3f3dad51e4585f3984282c2a4bec5349c1e --- /dev/null +++ b/cosiap_api/dynamic_forms/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/cosiap_api/dynamic_forms/apps.py b/cosiap_api/dynamic_forms/apps.py new file mode 100644 index 0000000000000000000000000000000000000000..9d5f527931a5710a0d09d60a99806c15a24255df --- /dev/null +++ b/cosiap_api/dynamic_forms/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class DynamicFormsConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'dynamic_forms' diff --git a/cosiap_api/dynamic_forms/migrations/__init__.py b/cosiap_api/dynamic_forms/migrations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/cosiap_api/dynamic_forms/models.py b/cosiap_api/dynamic_forms/models.py new file mode 100644 index 0000000000000000000000000000000000000000..71a836239075aa6e6e4ecb700e9c42c95c022d91 --- /dev/null +++ b/cosiap_api/dynamic_forms/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/cosiap_api/dynamic_forms/tests.py b/cosiap_api/dynamic_forms/tests.py new file mode 100644 index 0000000000000000000000000000000000000000..7ce503c2dd97ba78597f6ff6e4393132753573f6 --- /dev/null +++ b/cosiap_api/dynamic_forms/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/cosiap_api/dynamic_forms/views.py b/cosiap_api/dynamic_forms/views.py new file mode 100644 index 0000000000000000000000000000000000000000..91ea44a218fbd2f408430959283f0419c921093e --- /dev/null +++ b/cosiap_api/dynamic_forms/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/cosiap_api/dynamic_tables/__init__.py b/cosiap_api/dynamic_tables/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/cosiap_api/dynamic_tables/admin.py b/cosiap_api/dynamic_tables/admin.py new file mode 100644 index 0000000000000000000000000000000000000000..8c38f3f3dad51e4585f3984282c2a4bec5349c1e --- /dev/null +++ b/cosiap_api/dynamic_tables/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/cosiap_api/dynamic_tables/apps.py b/cosiap_api/dynamic_tables/apps.py new file mode 100644 index 0000000000000000000000000000000000000000..7cb400e1170d010f157f6dcf64d3d85a3df049c7 --- /dev/null +++ b/cosiap_api/dynamic_tables/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class DynamicTablesConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'dynamic_tables' diff --git a/cosiap_api/dynamic_tables/migrations/__init__.py b/cosiap_api/dynamic_tables/migrations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/cosiap_api/dynamic_tables/models.py b/cosiap_api/dynamic_tables/models.py new file mode 100644 index 0000000000000000000000000000000000000000..71a836239075aa6e6e4ecb700e9c42c95c022d91 --- /dev/null +++ b/cosiap_api/dynamic_tables/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/cosiap_api/dynamic_tables/tests.py b/cosiap_api/dynamic_tables/tests.py new file mode 100644 index 0000000000000000000000000000000000000000..7ce503c2dd97ba78597f6ff6e4393132753573f6 --- /dev/null +++ b/cosiap_api/dynamic_tables/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/cosiap_api/dynamic_tables/views.py b/cosiap_api/dynamic_tables/views.py new file mode 100644 index 0000000000000000000000000000000000000000..91ea44a218fbd2f408430959283f0419c921093e --- /dev/null +++ b/cosiap_api/dynamic_tables/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/cosiap_api/modalidades/__init__.py b/cosiap_api/modalidades/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/cosiap_api/modalidades/admin.py b/cosiap_api/modalidades/admin.py new file mode 100644 index 0000000000000000000000000000000000000000..8c38f3f3dad51e4585f3984282c2a4bec5349c1e --- /dev/null +++ b/cosiap_api/modalidades/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/cosiap_api/modalidades/apps.py b/cosiap_api/modalidades/apps.py new file mode 100644 index 0000000000000000000000000000000000000000..47ef3cb328fbec4ddc2acce2710fc61603f6db91 --- /dev/null +++ b/cosiap_api/modalidades/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class ModalidadesConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'modalidades' diff --git a/cosiap_api/modalidades/migrations/__init__.py b/cosiap_api/modalidades/migrations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/cosiap_api/modalidades/models.py b/cosiap_api/modalidades/models.py new file mode 100644 index 0000000000000000000000000000000000000000..71a836239075aa6e6e4ecb700e9c42c95c022d91 --- /dev/null +++ b/cosiap_api/modalidades/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/cosiap_api/modalidades/tests.py b/cosiap_api/modalidades/tests.py new file mode 100644 index 0000000000000000000000000000000000000000..7ce503c2dd97ba78597f6ff6e4393132753573f6 --- /dev/null +++ b/cosiap_api/modalidades/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/cosiap_api/modalidades/urls.py b/cosiap_api/modalidades/urls.py new file mode 100644 index 0000000000000000000000000000000000000000..b5a1ac34f90ee8a01516f9404f2a57a7201e537f --- /dev/null +++ b/cosiap_api/modalidades/urls.py @@ -0,0 +1,7 @@ +from . import views +from django.urls import path +from django.contrib.auth import views as auth_views + + +app_name = 'modalidades' +urlpatterns = [] \ No newline at end of file diff --git a/cosiap_api/modalidades/views.py b/cosiap_api/modalidades/views.py new file mode 100644 index 0000000000000000000000000000000000000000..91ea44a218fbd2f408430959283f0419c921093e --- /dev/null +++ b/cosiap_api/modalidades/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/cosiap_api/notificaciones/Mensajes.py b/cosiap_api/notificaciones/Mensajes.py new file mode 100644 index 0000000000000000000000000000000000000000..39289bdaafc0cb1a735479108445de5266bb3381 --- /dev/null +++ b/cosiap_api/notificaciones/Mensajes.py @@ -0,0 +1,73 @@ +class Mensaje: + """ + Clase estática para manejar mensajes de distintos tipos en un diccionario de respuesta. + Importacion: from notificaciones.mensajes import Mensaje as mensaje + + Métodos estáticos: + - success(response, message): Añade un mensaje de éxito. + - warning(response, message): Añade un mensaje de advertencia. + - error(response, message): Añade un mensaje de error. + - info(response, message): Añade un mensaje informativo. + """ + + @staticmethod + def _add_message(response, tag, message): + """ + Añade un mensaje al diccionario de respuesta bajo el tipo especificado. + + Parámetros: + - response (dict): El diccionario de respuesta donde se añadirán los mensajes. + - tag (str): El tipo de mensaje ('success', 'warning', 'error', 'info'). + - message (str): El mensaje a añadir. + """ + if 'data' not in response: + response['data'] = {} + if 'message' not in response['data']: + response['data']['message'] = {} + if tag not in response['data']['message']: + response['data']['message'][tag] = [] + response['data']['message'][tag].append(message) + + @staticmethod + def success(response, message): + """ + Añade un mensaje de éxito al diccionario de respuesta. + + Parámetros: + - response (dict): El diccionario de respuesta. + - message (str): El mensaje de éxito a añadir. + """ + Mensaje._add_message(response, 'success', message) + + @staticmethod + def warning(response, message): + """ + Añade un mensaje de advertencia al diccionario de respuesta. + + Parámetros: + - response (dict): El diccionario de respuesta. + - message (str): El mensaje de advertencia a añadir. + """ + Mensaje._add_message(response, 'warning', message) + + @staticmethod + def error(response, message): + """ + Añade un mensaje de error al diccionario de respuesta. + + Parámetros: + - response (dict): El diccionario de respuesta. + - message (str): El mensaje de error a añadir. + """ + Mensaje._add_message(response, 'error', message) + + @staticmethod + def info(response, message): + """ + Añade un mensaje informativo al diccionario de respuesta. + + Parámetros: + - response (dict): El diccionario de respuesta. + - message (str): El mensaje informativo a añadir. + """ + Mensaje._add_message(response, 'info', message) \ No newline at end of file diff --git a/cosiap_api/notificaciones/__init__.py b/cosiap_api/notificaciones/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/cosiap_api/notificaciones/admin.py b/cosiap_api/notificaciones/admin.py new file mode 100644 index 0000000000000000000000000000000000000000..8c38f3f3dad51e4585f3984282c2a4bec5349c1e --- /dev/null +++ b/cosiap_api/notificaciones/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/cosiap_api/notificaciones/apps.py b/cosiap_api/notificaciones/apps.py new file mode 100644 index 0000000000000000000000000000000000000000..01552209eacec3c3be38929ae2cc0b364d5040a9 --- /dev/null +++ b/cosiap_api/notificaciones/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class NotificacionesConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'notificaciones' diff --git a/cosiap_api/notificaciones/migrations/__init__.py b/cosiap_api/notificaciones/migrations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/cosiap_api/notificaciones/models.py b/cosiap_api/notificaciones/models.py new file mode 100644 index 0000000000000000000000000000000000000000..71a836239075aa6e6e4ecb700e9c42c95c022d91 --- /dev/null +++ b/cosiap_api/notificaciones/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/cosiap_api/notificaciones/tests.py b/cosiap_api/notificaciones/tests.py new file mode 100644 index 0000000000000000000000000000000000000000..7ce503c2dd97ba78597f6ff6e4393132753573f6 --- /dev/null +++ b/cosiap_api/notificaciones/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/cosiap_api/notificaciones/urls.py b/cosiap_api/notificaciones/urls.py new file mode 100644 index 0000000000000000000000000000000000000000..8a5263a05c84f7e03448558bdd4772d93cdd24db --- /dev/null +++ b/cosiap_api/notificaciones/urls.py @@ -0,0 +1,7 @@ +from . import views +from django.urls import path +from django.contrib.auth import views as auth_views + + +app_name = 'notificaciones' +urlpatterns = [] \ No newline at end of file diff --git a/cosiap_api/notificaciones/views.py b/cosiap_api/notificaciones/views.py new file mode 100644 index 0000000000000000000000000000000000000000..91ea44a218fbd2f408430959283f0419c921093e --- /dev/null +++ b/cosiap_api/notificaciones/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/cosiap_api/solicitudes/__init__.py b/cosiap_api/solicitudes/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/cosiap_api/solicitudes/admin.py b/cosiap_api/solicitudes/admin.py new file mode 100644 index 0000000000000000000000000000000000000000..8c38f3f3dad51e4585f3984282c2a4bec5349c1e --- /dev/null +++ b/cosiap_api/solicitudes/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/cosiap_api/solicitudes/apps.py b/cosiap_api/solicitudes/apps.py new file mode 100644 index 0000000000000000000000000000000000000000..6d7b729078f29fc10ce874397e5cc4c789a5b5e6 --- /dev/null +++ b/cosiap_api/solicitudes/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class SolicitudesConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'solicitudes' diff --git a/cosiap_api/solicitudes/migrations/__init__.py b/cosiap_api/solicitudes/migrations/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/cosiap_api/solicitudes/models.py b/cosiap_api/solicitudes/models.py new file mode 100644 index 0000000000000000000000000000000000000000..71a836239075aa6e6e4ecb700e9c42c95c022d91 --- /dev/null +++ b/cosiap_api/solicitudes/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/cosiap_api/solicitudes/tests.py b/cosiap_api/solicitudes/tests.py new file mode 100644 index 0000000000000000000000000000000000000000..7ce503c2dd97ba78597f6ff6e4393132753573f6 --- /dev/null +++ b/cosiap_api/solicitudes/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/cosiap_api/solicitudes/urls.py b/cosiap_api/solicitudes/urls.py new file mode 100644 index 0000000000000000000000000000000000000000..4a1b414ab49786b1a794e4bf24555619df47d843 --- /dev/null +++ b/cosiap_api/solicitudes/urls.py @@ -0,0 +1,7 @@ +from . import views +from django.urls import path +from django.contrib.auth import views as auth_views + + +app_name = 'solicitudes' +urlpatterns = [] \ No newline at end of file diff --git a/cosiap_api/solicitudes/views.py b/cosiap_api/solicitudes/views.py new file mode 100644 index 0000000000000000000000000000000000000000..91ea44a218fbd2f408430959283f0419c921093e --- /dev/null +++ b/cosiap_api/solicitudes/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/cosiap_api/users/migrations/0010_creacion_modulos_admin_formats_forms_tables_modalidades_solicitudes.py b/cosiap_api/users/migrations/0010_creacion_modulos_admin_formats_forms_tables_modalidades_solicitudes.py new file mode 100644 index 0000000000000000000000000000000000000000..a3de9c8fba7fcffe91a83f894460ff106b08d58a --- /dev/null +++ b/cosiap_api/users/migrations/0010_creacion_modulos_admin_formats_forms_tables_modalidades_solicitudes.py @@ -0,0 +1,19 @@ +# Generated by Django 5.0.6 on 2024-07-05 20:27 + +import common.nombres_archivos +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0009_solicitante_campos_no_vacios'), + ] + + operations = [ + migrations.AlterField( + model_name='solicitante', + name='INE', + field=models.FileField(null=True, upload_to=common.nombres_archivos.nombre_archivo_ine, verbose_name='INE'), + ), + ] diff --git a/cosiap_api/users/urls.py b/cosiap_api/users/urls.py index f3e1c613991cf60baf0aa76a7e9af824a0954318..d73a4e649fa2f8ae67542de654b21a31cce98b46 100644 --- a/cosiap_api/users/urls.py +++ b/cosiap_api/users/urls.py @@ -1,18 +1,3 @@ -"""becas_cozcyt URL Configuration - -The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/4.1/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 . import views from django.urls import path from django.contrib.auth import views as auth_views diff --git a/cosiap_api/users/views.py b/cosiap_api/users/views.py index 7c2a1506ca38fd0eea698fd495fbe24b36081b65..d5b7da6e8ddf0ff56fc9ff683a4ea8cbd4c14646 100644 --- a/cosiap_api/users/views.py +++ b/cosiap_api/users/views.py @@ -40,7 +40,7 @@ class CustomTokenObtainPairView(TokenObtainPairView): # Eliminar el refresh token de la respuesta JSON del response.data['refresh'] # Agregar mensaje de éxito - response.data['message'] = {'succes':'Login exitoso'} + response.data['message'] = {'success':'Login exitoso'} return response