# HG changeset patch # User Brian Neal # Date 1412458817 18000 # Node ID f31168465953a371aaf8cb2ef4a1b0cebab7ef07 # Parent 234726f5a47a9c779963da006120777606613236 Bandmap: make lat/lon editable for tweaking location markers. Don't cache band results in debug mode. diff -r 234726f5a47a -r f31168465953 bandmap/admin.py --- a/bandmap/admin.py Sat Oct 04 13:43:22 2014 -0500 +++ b/bandmap/admin.py Sat Oct 04 16:40:17 2014 -0500 @@ -18,7 +18,7 @@ 'is_active', 'is_approved'] date_hierarchy = 'date_submitted' list_filter = ['date_submitted', 'is_active', 'is_approved'] - readonly_fields = ['lat', 'lon'] + list_editable = ['lat', 'lon'] search_fields = ['name', 'location', 'note'] raw_id_fields = ['user'] actions = ['update_location', 'approve_bands'] diff -r 234726f5a47a -r f31168465953 bandmap/views.py --- 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