1👍
✅
You can achieve this by passing the keyword argument in a dictionary, and expanding that into the kwargs for Field
using the **
unpacking operator:
Field('model', **{"x-bind:disable": "disableInput"})
This gets around the fact that you can’t use dashes and colons in Python variable names. The attribute will be rendered as:
<input ... x-bind:disable="disableInput">
Source:stackexchange.com