From 6aacff3f4c27ac68ebda14a803bee9f3d70fd5d9 Mon Sep 17 00:00:00 2001 From: Gagandeep Singh Date: Wed, 28 Nov 2018 00:31:46 +0530 Subject: [PATCH] Fix for TOXENV=py27-lint --- categories/editor/tree_editor.py | 4 ++-- example/simpletext/models.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/categories/editor/tree_editor.py b/categories/editor/tree_editor.py index 31b8ab0..5b8c6fe 100644 --- a/categories/editor/tree_editor.py +++ b/categories/editor/tree_editor.py @@ -148,7 +148,7 @@ class TreeEditor(admin.ModelAdmin): self.list_display_links, self.list_filter, self.date_hierarchy, self.search_fields, self.list_select_related, self.list_per_page, self.list_editable, self) - elif django.VERSION[0] == 1 or ( django.VERSION[0] == 2 and django.VERSION[1] < 1): + elif django.VERSION[0] == 1 or (django.VERSION[0] == 2 and django.VERSION[1] < 1): params = ( request, self.model, list_display, self.list_display_links, self.list_filter, self.date_hierarchy, @@ -250,7 +250,7 @@ class TreeEditor(admin.ModelAdmin): } if django.VERSION[0] == 1 and django.VERSION[1] < 4: context['root_path'] = self.admin_site.root_path - elif django.VERSION[0] == 1 or ( django.VERSION[0] == 2 and django.VERSION[1] < 1): + elif django.VERSION[0] == 1 or (django.VERSION[0] == 2 and django.VERSION[1] < 1): selection_note_all = ungettext('%(total_count)s selected', 'All %(total_count)s selected', cl.result_count) context.update({ diff --git a/example/simpletext/models.py b/example/simpletext/models.py index 41c1838..0fe96d1 100755 --- a/example/simpletext/models.py +++ b/example/simpletext/models.py @@ -21,7 +21,6 @@ class SimpleText(models.Model): def __unicode__(self): return self.name - def get_absolute_url(self): try: from django.db.models import permalink