Source code for superdjango.ui.runtime.panels
# Exports
__all__ = (
"Panel",
)
# Classes
[docs]class Panel(object):
"""Panel output."""
[docs] def __init__(self, content, **kwargs):
"""Initialize panel output.
:param content: The (parsed) panel content to be displayed.
:type: str
.. note::
Additional keyword arguments are available as attributes of the panel instance.
"""
self.attributes = kwargs
self.content = content
def __getattr__(self, item):
return self.attributes.get(item)
def __str__(self):
return self.content