From 4d9ba1c8ce5fce733055e61f318fb178110a3a90 Mon Sep 17 00:00:00 2001 From: Raffaele Salmaso Date: Thu, 22 Feb 2018 23:34:29 +0100 Subject: [PATCH] Remove BuildAttrsCompat. --- src/wiki/compat.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/wiki/compat.py b/src/wiki/compat.py index 2bbb746d..bd5c351a 100644 --- a/src/wiki/compat.py +++ b/src/wiki/compat.py @@ -9,28 +9,11 @@ except ImportError: __all__ = [ - 'BuildAttrsCompat', 'get_default_engine', 'include', 'url' ] -# Django 1.11 Widget.build_attrs has a different signature, designed for the new -# template based rendering. The previous version was more useful for our needs, -# so we restore that version. -# When support for Django < 1.11 is dropped, we should look at using the -# new template based rendering, at which point this probably won't be needed at all. -class BuildAttrsCompat: - def build_attrs_compat(self, extra_attrs=None, **kwargs): - "Helper function for building an attribute dictionary." - attrs = self.attrs.copy() - if extra_attrs is not None: - attrs.update(extra_attrs) - if kwargs is not None: - attrs.update(kwargs) - return attrs - - def get_default_engine(): """ Django >= 2.1 Engine.get_default() behaviour -- 2.45.2