From 1b80f0af7da61f9a9a22f9bb71193086fbf81434 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Thu, 3 Apr 2008 03:12:13 -0400 Subject: [PATCH] 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 --- code/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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.') -- 1.7.9.5