From: Greg Price Date: Thu, 3 Apr 2008 07:12:13 +0000 (-0400) Subject: give useful URIs after per-VM commands X-Git-Tag: sipb-xen-www/3.4~57 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/1b80f0af7da61f9a9a22f9bb71193086fbf81434?ds=sidebyside give useful URIs after per-VM commands I haven't done this for the list page, because the create command's result message is at least minimally useful and I haven't made a mechanism for displaying those messages at the standard URIs. svn path=/trunk/packages/sipb-xen-www/; revision=407 --- diff --git a/code/main.py b/code/main.py index 8bc9ece..ebbd7dd 100755 --- a/code/main.py +++ b/code/main.py @@ -344,9 +344,9 @@ def command(user, fields): return templates.list(searchList=[d]) elif back == 'info': machine = validation.testMachineId(user, fields.getfirst('machine_id')) - d = infoDict(user, machine) - d['result'] = result - return templates.info(searchList=[d]) + return ({'Status': '302', + 'Location': '/info?machine_id=%d' % machine.machine_id}, + "You shouldn't see this message.") else: raise InvalidInput('back', back, 'Not a known back page.')