eco-back 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {eco_back-0.2.0/src/eco_back.egg-info → eco_back-0.2.1}/PKG-INFO +1 -1
- {eco_back-0.2.0 → eco_back-0.2.1}/pyproject.toml +1 -1
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back/__init__.py +1 -1
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back/api/registro.py +3 -0
- eco_back-0.2.1/src/eco_back/registro/trazabilidad.py +27 -0
- {eco_back-0.2.0 → eco_back-0.2.1/src/eco_back.egg-info}/PKG-INFO +1 -1
- eco_back-0.2.0/src/eco_back/registro/trazabilidad.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/LICENSE +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/MANIFEST.in +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/README.md +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/setup.cfg +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back/api/__init__.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back/api/client.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back/api/config.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back/database/__init__.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back/database/config.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back/database/connection.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back/database/models.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back/database/postgis.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back/database/repository.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back/documento/__init__.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back/documento/anexos.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back/registro/__init__.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back.egg-info/SOURCES.txt +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back.egg-info/dependency_links.txt +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back.egg-info/requires.txt +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/src/eco_back.egg-info/top_level.txt +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/tests/test_anexos.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/tests/test_api.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/tests/test_database.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/tests/test_example.py +0 -0
- {eco_back-0.2.0 → eco_back-0.2.1}/tests/test_postgis.py +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from rest_framework.decorators import api_view, renderer_classes
|
|
2
|
+
from django.views.decorators.csrf import csrf_exempt
|
|
3
|
+
from rest_framework.renderers import JSONRenderer
|
|
4
|
+
from rest_framework import status
|
|
5
|
+
from registro.models.models_global import Trazabilidad
|
|
6
|
+
from registro.serializer.serializer_get import TrazabilidadSerializer
|
|
7
|
+
from rest_framework.response import Response
|
|
8
|
+
|
|
9
|
+
from utils.guardado_datos.exceptions import ServiceValidationError, ServiceValidationError, handle_service_validation_error
|
|
10
|
+
from utils.logger_generico import _log_warn
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@csrf_exempt
|
|
14
|
+
@api_view(['GET'])
|
|
15
|
+
@renderer_classes([JSONRenderer])
|
|
16
|
+
@handle_service_validation_error
|
|
17
|
+
def TrazabilidadRegistroPermiso(request, registro_id):
|
|
18
|
+
try:
|
|
19
|
+
trazabilidades = Trazabilidad.objects.filter(
|
|
20
|
+
registro=int(registro_id)
|
|
21
|
+
).order_by('fecha_recibido')
|
|
22
|
+
|
|
23
|
+
serializer = TrazabilidadSerializer(trazabilidades, many=True)
|
|
24
|
+
return Response(serializer.data, status=status.HTTP_200_OK)
|
|
25
|
+
except Exception as e:
|
|
26
|
+
_log_warn(f"Consulta trazabilidades - error consultando trazabilidades: {e}", level='error', exc_info=True)
|
|
27
|
+
raise ServiceValidationError("Trazabilidades no encontradas", code=400, context={"exception": str(e)})
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|