web/ldt/text/views.py
changeset 22 83b28fc0d731
parent 19 7cf81d58a968
child 24 9e19b7ae3780
equal deleted inserted replaced
20:20c41a7e2173 22:83b28fc0d731
   152         annot = Annotation.objects.get(external_id=request.POST["id"])
   152         annot = Annotation.objects.get(external_id=request.POST["id"])
   153         annot.delete()
   153         annot.delete()
   154     except Annotation.DoesNotExist:
   154     except Annotation.DoesNotExist:
   155         raise Http404
   155         raise Http404
   156     
   156     
   157     doc=create_empty_annotation()
   157     return HttpResponse("")
   158     return HttpResponse(lxml.etree.tostring(doc, pretty_print=True), mimetype="text/xml;charset=utf-8")
       
   159 
   158 
   160 
   159 
   161 ## Updates the content of an annotation
   160 ## Updates the content of an annotation
   162 ## Returns the xml-structured updated annotation
   161 ## Returns the xml-structured updated annotation
   163 @oauth_required
   162 @oauth_required