def advance_status(request): ''' Advance the status of an annotation ''' if isPOST(request) and 'application/json' in content_type(request): params = json.loads(request.body) LOGGING.info("advancing %s to state:%s" % (params.get('annotation'), params.get('toState'))) tmp_g = change_annotation_state(params.get('annotation'), params.get('toState')) return HttpResponse(tmp_g.serialize())
def advance_status(request): ''' Advance the status of an annotation ''' if isPOST(request) and 'application/json' in content_type(request): params = json.loads(request.body) if not params.has_key('annotation') or not params.has_key('state'): messages.add_message(request, messages.ERROR, "Missing annotation/state parameters") return mm_render_to_response_error(request, '400.html', 400) LOGGING.info("advancing %s to state:%s" % (params.get('annotation'), params.get('toState'))) tmp_g = change_annotation_state(params.get('annotation'), params.get('toState')) return HttpResponse(tmp_g.serialize())