From a83eee5eaffaf0faf2b2c8da837970583792ba3c Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 12 Apr 2012 00:07:54 +0200 Subject: Small fixes for django 1.4 --- chimere/admin.py | 1 - chimere/forms.py | 1 - chimere/views.py | 2 +- chimere/widgets.py | 2 -- example_project/settings.py.example | 4 ++-- 5 files changed, 3 insertions(+), 7 deletions(-) diff --git a/chimere/admin.py b/chimere/admin.py index 42d536e..b34b2ca 100644 --- a/chimere/admin.py +++ b/chimere/admin.py @@ -70,7 +70,6 @@ def export_to_kml(modeladmin, request, queryset): filename = ''.join( (c for c in unicodedata.normalize('NFD', settings.PROJECT_NAME) if unicodedata.category(c) != 'Mn')) + '-' + dct['description'] + '.kml' - print filename response['Content-Disposition'] = 'attachment; filename=%s' % filename return response export_to_kml.short_description = _(u"Export to KML") diff --git a/chimere/forms.py b/chimere/forms.py index 430cb0c..fb71057 100644 --- a/chimere/forms.py +++ b/chimere/forms.py @@ -147,7 +147,6 @@ class MarkerAdminFormBase(forms.ModelForm): """ Custom save method in order to manage associated properties """ - print self.cleaned_data new_marker = super(MarkerAdminFormBase, self).save(*args, **keys) if 'status' not in self.cleaned_data: new_marker.status = 'S' diff --git a/chimere/views.py b/chimere/views.py index 2a85c21..7dc6669 100644 --- a/chimere/views.py +++ b/chimere/views.py @@ -464,7 +464,7 @@ def getGeoObjects(request, area_name, category_ids, status): idx += 1 try: q = checkDate(Q(status__in=status, categories__in=category_ids)) - query = Marker.objects.filter(q).distinct('pk') + query = Marker.objects.filter(q).distinct('pk').order_by('pk') except: return HttpResponse('no results') category_ids = [int(cat_id) for cat_id in category_ids] diff --git a/chimere/widgets.py b/chimere/widgets.py index 04a8e65..729f939 100644 --- a/chimere/widgets.py +++ b/chimere/widgets.py @@ -217,8 +217,6 @@ class RouteChooserWidget(forms.TextInput): u"\"d\" or \"Del\" key."), _(u"To add a point click in the middle of a segment and drag the new "\ u"point to the desired position")) - #tpl += u'\n' % \ - # settings.STATIC_URL if not value: # upload a file tpl += u"