Action

Base class: Part

The Action class describes buttons and links.

Examples:

# Link
Action(attrs__href='http://example.com')

# Link with icon
Action.icon('edit', attrs__href="edit/")

# Button
Action.button(attrs__value='Button title!')

Refinable members

  • after
  • attrs
    Type: Attrs
  • display_name
    Type: str
  • endpoints
    Type: Namespace
  • extra
  • extra_evaluated
  • group
    Type: str
  • include
    Type: bool
  • iommi_style
    Type: str
  • post_handler
  • tag
    Type: str
  • template

Defaults

  • display_name
    • lambda action, **_: capitalize(action._name).replace('_', ' ')
  • tag
    • a

Shortcuts

button

Defaults

  • tag
    • button

delete

Defaults

  • call_target__attribute
    • submit

icon

Defaults

  • icon_classes
    • []

submit

Defaults

  • call_target__attribute
    • button
  • tag
    • input
  • attrs__type
    • submit
  • attrs__accesskey
    • s
  • attrs__name
    • lambda action, **_: action.own_target_marker()