Skip to content

Commit

Permalink
[tests] Remove leftover code for Django < 1.11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-k authored and jdufresne committed Apr 20, 2018
1 parent 9138a5f commit 4931318
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
7 changes: 0 additions & 7 deletions tests/myapp/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,9 @@ def custom_method(self):

class CustomTreeManager(TreeManager):

def get_query_set(self):
return CustomTreeQueryset(model=self.model, using=self._db)

def get_queryset(self):
# Django 1.8 removed the fallbacks here.
return CustomTreeQueryset(model=self.model, using=self._db)

def get_empty_query_set(self):
return self.get_queryset().none()


@python_2_unicode_compatible
class Category(MPTTModel):
Expand Down
6 changes: 1 addition & 5 deletions tests/myapp/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,4 @@

from django.contrib import admin


if django.VERSION >= (1, 9):
urlpatterns = [url(r'^admin/', admin.site.urls)]
else:
urlpatterns = [url(r'^admin/', include(admin.site.urls))]
urlpatterns = [url(r'^admin/', admin.site.urls)]

0 comments on commit 4931318

Please sign in to comment.