-# xxx should probably cater for
-# format_in : how is the query encoded in POST
-# format_out: how to serve the results
+# this view is what the javascript talks to when it sends a query
+# see also
+# myslice/urls.py
+# as well as
+# static/js/manifold-async.js
# expecting a POST
if request.method != 'POST':
print "manifoldproxy.api: unexpected method %s -- exiting"%request.method
return
# we only support json for now
# expecting a POST
if request.method != 'POST':
print "manifoldproxy.api: unexpected method %s -- exiting"%request.method
return
# we only support json for now
-# to enable : see CSRF_FAILURE_VIEW in settings.py
-# probably we want to elaborate this one a little in real life
-# at least we can display the reason in the django output (although this turns out disappointing)
+# see CSRF_FAILURE_VIEW in settings.py
+# the purpose of redefining this was to display the failure reason somehow
+# this however turns out disappointing/not very informative
failure_answer=[ "csrf_failure" ]
def csrf_failure(request, reason=""):
print "CSRF failure with reason '%s'"%reason
failure_answer=[ "csrf_failure" ]
def csrf_failure(request, reason=""):
print "CSRF failure with reason '%s'"%reason