From 5a2ac9d032df7fe6b3b3f51256e9e93978a0eb78 Mon Sep 17 00:00:00 2001 From: Johnson Chetty Date: Fri, 5 Oct 2012 16:29:11 +0200 Subject: [PATCH] route method headways() tweak 1.3 --- chaloBEST/mumbai/models.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/chaloBEST/mumbai/models.py b/chaloBEST/mumbai/models.py index 3d6b3e2..c26cf9c 100644 --- a/chaloBEST/mumbai/models.py +++ b/chaloBEST/mumbai/models.py @@ -278,7 +278,7 @@ class Route(models.Model): 'slug': self.slug, 'distance': str(self.distance), 'url': self.get_absolute_url(), - 'headways': self.headways() + 'headway': self.headways() } def areas_passed(self): @@ -323,9 +323,8 @@ class Route(models.Model): return None frequencies = [x for x in freqs if x!=0] - return { - 'frequency': str(min(frequencies)) + "-" + str(max(frequencies)) if min(frequencies)!=max(frequencies) else str(max(frequencies)) - } + return str(min(frequencies)) + "-" + str(max(frequencies)) if min(frequencies)!=max(frequencies) else str(max(frequencies)) + #'scheds': [ (s.headway1, s.headway2, s.headway3, s.headway4, str(s.unique_route) ) for s in scheds]