diff bandmap/views.py @ 838:f31168465953

Bandmap: make lat/lon editable for tweaking location markers. Don't cache band results in debug mode.
author Brian Neal <bgneal@gmail.com>
date Sat, 04 Oct 2014 16:40:17 -0500
parents 0f9c014c8adc
children 7735f8a6bd1f
line wrap: on
line diff
--- a/bandmap/views.py	Sat Oct 04 13:43:22 2014 -0500
+++ b/bandmap/views.py	Sat Oct 04 16:40:17 2014 -0500
@@ -9,6 +9,7 @@
 from django.http import HttpResponse
 from django.template.loader import render_to_string
 from django.core.cache import cache
+from django.conf import settings
 
 from bandmap.forms import BandForm
 from bandmap.models import BandEntry
@@ -54,7 +55,7 @@
     # Do we have the results cached already?
     cache_key = 'bandmap-results-{}'.format(show_param)
     results = cache.get(cache_key)
-    if results:
+    if results and not settings.DEBUG:
         return HttpResponse(results, content_type='application/json')
 
     # Generate results