From c1f39b1a168d535e0b90d3c69273e391adf22637 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Wed, 16 Oct 2013 22:14:41 +0200 Subject: Remove compatibility code for unsupported version of Django. --- debug_toolbar/utils/compat/__init__.py | 0 debug_toolbar/utils/compat/db.py | 13 ------------- debug_toolbar/utils/functional.py | 14 -------------- 3 files changed, 27 deletions(-) delete mode 100644 debug_toolbar/utils/compat/__init__.py delete mode 100644 debug_toolbar/utils/compat/db.py delete mode 100644 debug_toolbar/utils/functional.py (limited to 'debug_toolbar/utils') diff --git a/debug_toolbar/utils/compat/__init__.py b/debug_toolbar/utils/compat/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/debug_toolbar/utils/compat/db.py b/debug_toolbar/utils/compat/db.py deleted file mode 100644 index 6ff09ec..0000000 --- a/debug_toolbar/utils/compat/db.py +++ /dev/null @@ -1,13 +0,0 @@ -from django.conf import settings -try: - from django.db import connections - dbconf = settings.DATABASES -except ImportError: - # Compat with < Django 1.2 - from django.db import connection - connections = {'default': connection} - dbconf = { - 'default': { - 'ENGINE': settings.DATABASE_ENGINE, - } - } diff --git a/debug_toolbar/utils/functional.py b/debug_toolbar/utils/functional.py deleted file mode 100644 index 1dbb734..0000000 --- a/debug_toolbar/utils/functional.py +++ /dev/null @@ -1,14 +0,0 @@ -try: - from django.utils.functional import cached_property -except ImportError: # Django < 1.4 - class cached_property(object): - """ - Decorator that creates converts a method with a single - self argument into a property cached on the instance. - """ - def __init__(self, func): - self.func = func - - def __get__(self, instance, type): - res = instance.__dict__[self.func.__name__] = self.func(instance) - return res -- cgit v1.2.3