feat: widgets interface

Widgets are reusable jinja templates which can be used in other
themplates. Widgets are written in widgets/ directory in every frappe
module and can be accessed as `{{ widgets.WidgetName(...) }}` from any
template.
This commit is contained in:
Anand Chitipothu
2021-04-29 10:37:36 +05:30
parent 0ab4fbb03d
commit 5feeb4ca0c
4 changed files with 92 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
{#
Widget to demonostrate how to write a widget.
A wiget is a reusable template, that can be used in
other templates.
To this widget can be called as:
{{ widgets.HelloWorld(name="World") }}
#}
<div class="hello">
Hello, <em>{{ name }}</em>!
</div>