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.Panel

Empty Bootstrap Card.

build()
class engel.libraries.bootstrap4.widgets.structure.CardColumns(id, classname=None, parent=None, **kwargs)

Bases: engel.widgets.structure.Panel

Display card by columns. Views using the bootstrap4 module should use CardColumns instead of List for item display.

build()
class engel.libraries.bootstrap4.widgets.structure.Container(id, classname=None, parent=None, **kwargs)

Bases: engel.widgets.structure.Panel

Bootstrap Container (container-fluid). Views using the bootstrap4 module should use containers instead of Panel.

build()
class engel.libraries.bootstrap4.widgets.structure.ImageCard(id, classname=None, parent=None, **kwargs)

Bases: engel.libraries.bootstrap4.widgets.structure.BaseCard

Image 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