def handle_command(request, command):
 path = (request.POST.get('path') or request.META.get('HTTP_REFERER') or '/')
 if ((command == 'edit_on') or (command == 'edit_off')):
  set_edit_mode(request, command.endswith('_on'))
  return HttpResponseRedirect(path)

def handle_command ( request , command ) : path = ( request . POST . get ( 'path' ) or request . META . get ( 'HTTP_REFERER' ) or '/' ) if ( ( command == 'edit_on' ) or ( command == 'edit_off' ) ) : set_edit_mode ( request , command . endswith ( '_on' ) ) return HttpResponseRedirect ( path )
internal dispatch function .