mirror of
https://github.com/django-components/django-components.git
synced 2025-07-14 12:14:59 +00:00
Use six to allow metaclass usage in both Python 2 and 3.
This commit is contained in:
parent
f60b443f07
commit
cbe2bcc9c9
2 changed files with 3 additions and 1 deletions
|
@ -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 {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue