mirror of
https://github.com/django-components/django-components.git
synced 2025-07-17 13:34:58 +00:00
Add a basic Component class.
This commit is contained in:
parent
df22a4049f
commit
31261ece08
2 changed files with 26 additions and 0 deletions
|
@ -1,4 +1,16 @@
|
|||
from .component_registry import ComponentRegistry, AlreadyRegistered, NotRegistered # NOQA
|
||||
|
||||
class Component(object):
|
||||
def __init__(self):
|
||||
self._media = self.Media()
|
||||
|
||||
def context(self):
|
||||
return {}
|
||||
|
||||
class Media:
|
||||
template = None
|
||||
css = {}
|
||||
js = ()
|
||||
|
||||
# This variable represents the global component registry
|
||||
registry = ComponentRegistry()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue