Пример #1
0
def release(request, document_id):
    section_id = request.POST.get('sectionId')
    utils.release_section(section_id)

    return JsonResponse({
        'status': True
    })
Пример #2
0
def update(request, document_id, section_id):
    section = get_object_or_404(models.Section, id=section_id)
    section.content = request.POST.get('content')
    section.modifier = request.user
    section.message = request.POST.get('message')
    section.save()

    utils.release_section(section_id)

    return redirect('edit:index', document_id=document_id)