Initial commit

This commit is contained in:
2024-08-27 20:33:44 +02:00
commit 1f1832267d
14794 changed files with 1599592 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
from .base import Panel
class HelpPanel(Panel):
"""
A panel to display helpful information to the user.
This panel does not support the ``help_text`` parameter.
"""
def __init__(
self,
content="",
template="wagtailadmin/panels/help_panel.html",
**kwargs,
):
super().__init__(**kwargs)
self.content = content
self.template = template
def clone_kwargs(self):
kwargs = super().clone_kwargs()
del kwargs["help_text"]
kwargs.update(
content=self.content,
template=self.template,
)
return kwargs
@property
def clean_name(self):
return super().clean_name or "help"
class BoundPanel(Panel.BoundPanel):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.template_name = self.panel.template
self.content = self.panel.content