+
+def document_diff(request, name, revA, revB):
+ differ = difflib.HtmlDiff(wrapcolumn=60)
+
+ docA = storage.get(name, int(revA))
+ docB = storage.get(name, int(revB))
+
+ return HttpResponse(differ.make_table(
+ docA.plain_text.splitlines(),
+ docB.plain_text.splitlines() ) )
+
+
+def document_history(reuqest, name):
+ return HttpResponse( json.dumps(storage.history(name), cls=DateTimeEncoder), mimetype='application/json')