Add plugin platform with modular backend and frontend registry.

Split graph/import/meta into Django apps, add API v1 with OpenAPI and pytest, and introduce plugin registry with the tags reference plugin on both FE and BE.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-25 09:35:51 +03:00
co-authored by Cursor
parent b694a596b8
commit cafc7335ad
77 changed files with 1801 additions and 490 deletions
+19
View File
@@ -0,0 +1,19 @@
from rest_framework import status
from rest_framework.decorators import api_view
from rest_framework.response import Response
from .services import parse_upload_file, import_contacts_from_rows
@api_view(['POST'])
def import_contacts(request):
file = request.FILES.get('file')
if not file:
return Response({'error': 'Файл не передан.'}, status=status.HTTP_400_BAD_REQUEST)
try:
rows, error = parse_upload_file(file)
if error:
return Response({'error': error}, status=status.HTTP_400_BAD_REQUEST)
return Response(import_contacts_from_rows(rows))
except Exception as e:
return Response({'error': f'Ошибка разбора файла: {e}'}, status=status.HTTP_400_BAD_REQUEST)