Пример #1
0
def insert_neume(request, page_id):
    if request.method == 'POST':
        before_id = str(request.POST.get('beforeid'))
        pname = str(request.POST.get('pname'))
        oct = str(request.POST.get('oct'))
        dot_form = request.POST.get('dotform')

        try:
            ulx = str(request.POST['ulx'])
            uly = str(request.POST['uly'])
            lrx = str(request.POST['lrx'])
            lry = str(request.POST['lry'])
        except KeyError:
            ulx = uly = lrx = lry = None

        p = get_object_or_404(Page, pk=page_id)
        fname = p.get_job_path(j, 'mei')

        md = ModifyDocument(fname)
        result = md.insert_punctum(before_id, pname, oct, dot_form, ulx, uly, lrx, lry)
        md.write_doc()

        return result
Пример #2
0
def insert_neume(request, page_id):
    if request.method == 'POST':
        before_id = str(request.POST.get('beforeid'))
        pname = str(request.POST.get('pname'))
        oct = str(request.POST.get('oct'))
        dot_form = request.POST.get('dotform')

        try:
            ulx = str(request.POST['ulx'])
            uly = str(request.POST['uly'])
            lrx = str(request.POST['lrx'])
            lry = str(request.POST['lry'])
        except KeyError:
            ulx = uly = lrx = lry = None

        p = get_object_or_404(Page, pk=page_id)
        fname = p.get_job_path(j, 'mei')

        md = ModifyDocument(fname)
        result = md.insert_punctum(before_id, pname, oct, dot_form, ulx, uly,
                                   lrx, lry)
        md.write_doc()

        return result