Use six to allow metaclass usage in both Python 2 and 3.

This commit is contained in:
Emil Stenström 2019-11-24 10:57:55 +01:00
parent f60b443f07
commit cbe2bcc9c9
2 changed files with 3 additions and 1 deletions

View file

@ -1,8 +1,9 @@
from django.template.loader import render_to_string
from .component_registry import ComponentRegistry, AlreadyRegistered, NotRegistered # NOQA
from django.forms.widgets import MediaDefiningClass
from six import with_metaclass
class Component(metaclass=MediaDefiningClass):
class Component(with_metaclass(MediaDefiningClass)):
def context(self):
return {}