0.0.48 w route card

This commit is contained in:
SBD
2025-01-18 15:08:26 +03:00
parent 2a7a666f7d
commit feb2b9d697
3 changed files with 14 additions and 8 deletions

View File

@@ -6,6 +6,9 @@ from django.conf import settings
from django.shortcuts import render
from uuid import uuid1
from twisted.web.http import stringToDatetime
from .models import *
from django.contrib import auth
from django.http import HttpResponse, Http404, JsonResponse
@@ -195,7 +198,9 @@ def edit_route_ajax(request):
print(msg)
return JsonResponse({'errors': msg})
html = render_to_string('blocks/profile/b_new_route.html', Dict, request=request)
tpl_name = f'v2/blocks/b_create_{ route.owner_type }_route.html'
html = render_to_string(tpl_name, Dict, request=request)
res_Dict = {
'html': html,
'btn_title': _('Сохранить изменения')