From a1ff47b818567962b111e77bdbf08b2966fb2691 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 24 Feb 2010 13:11:15 -0500 Subject: [PATCH] Added the postback_url parameter to the LocationController. --- www/maps/maps/controllers/location.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/www/maps/maps/controllers/location.py b/www/maps/maps/controllers/location.py index dc38833..5bf517c 100644 --- a/www/maps/maps/controllers/location.py +++ b/www/maps/maps/controllers/location.py @@ -11,6 +11,9 @@ log = logging.getLogger(__name__) class LocationController(BaseController): + def __init__(self): + c.postback_url = None + def index(self): return render('/location/index.mako') @@ -18,6 +21,9 @@ class LocationController(BaseController): def route(self): if request.method != 'POST': return 'You should have posted some data.' + + if (c.postback_url == None): + c.postback_url = '/directions/json_to_kml' # Get the contents of the uploaded files. producers_data = request.POST['producers'].value.splitlines() @@ -46,3 +52,7 @@ class LocationController(BaseController): return render('location/route.mako') + def distance(self): + c.postback_url = '/directions/distances' + return self.route() + -- 2.44.2