fix KeyError: 'IconPluginMixin'
+import pkg_resources
from django.forms.models import ModelChoiceField
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
@@ -38,7 +39,10 @@ class IconPluginMixin(CascadePluginMixinBase):
return super().get_form(request, obj, **kwargs)
def render(self, context, instance, placeholder):
+ if pkg_resources.get_distribution('django').version >= "2.0.0":
context = self.super(IconPluginMixin, self).render(context, instance, placeholder)
+ elif pkg_resources.get_distribution('django').version < "2.0.0"
+ context = super(IconPluginMixin, self).render(context, instance, placeholder)
icon_font = get_related_object(instance.glossary, 'icon_font')
symbol = instance.glossary.get('symbol')
if icon_font and symbol:
