Engel-Supported Libraries¶
To use Engel-supported libraries, simply import them and use them in your views.
from engel.libraries import bootstrap4
class MainView(View):
title = "MyView"
libraries = [bootstrap4]
def build(self):
main_panel = bootstrap4.Container(id="containerMain", parent=self.root)
cols = bootstrap4.CardColumns(id="mycols", parent=main_panel)
for i in range(30):
bootstrap4.ImageCard(id="mycard" + str(i), title="This is a Title", text="This is a description", img_url="http://mysite.com", parent=cols)
Bootstrap 4 (Alpha)¶
Widgets¶
-
class
engel.libraries.bootstrap4.widgets.structure.BaseCard(id, classname=None, parent=None, **kwargs)¶ Bases:
engel.widgets.structure.PanelEmpty Bootstrap Card.
-
build()¶
-
-
class
engel.libraries.bootstrap4.widgets.structure.CardColumns(id, classname=None, parent=None, **kwargs)¶ Bases:
engel.widgets.structure.PanelDisplay card by columns. Views using the
bootstrap4module should use CardColumns instead ofListfor item display.-
build()¶
-
-
class
engel.libraries.bootstrap4.widgets.structure.Container(id, classname=None, parent=None, **kwargs)¶ Bases:
engel.widgets.structure.PanelBootstrap Container (container-fluid). Views using the
bootstrap4module should use containers instead ofPanel.-
build()¶
-
-
class
engel.libraries.bootstrap4.widgets.structure.ImageCard(id, classname=None, parent=None, **kwargs)¶ Bases:
engel.libraries.bootstrap4.widgets.structure.BaseCardImage card, with a title and short description.
-
build(title, text, img_url)¶ Parameters: - title – Title of the card
- text – Description of the card
- img_url – Image of the card
-