You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Obvious problem is that dash is illegal in variable names.
An obvious solution is to define the variable prefix in widget context based on self.uuid (see widgets.py) and use it instead of widget.name. As a workaround, monkey-patching markdownfield/widget.html via copying the source to any internal app and replacing {{ widget.name }}_options with {{ options_id }}_options works, although generated names like options_MZdmTr6jNmZtxZhU5tjWzw_options aren't that pretty.
P.S. I'll try to provide a MR if I have time ;)
The text was updated successfully, but these errors were encountered:
Admin widgets use auto-generated JS like this (see widgets.html for source):
It's fine for usual ModelAdmin instances, but inline admins would produce invalid code like this:
Obvious problem is that dash is illegal in variable names.
An obvious solution is to define the variable prefix in widget context based on self.uuid (see widgets.py) and use it instead of
widget.name
. As a workaround, monkey-patchingmarkdownfield/widget.html
via copying the source to any internal app and replacing{{ widget.name }}_options
with{{ options_id }}_options
works, although generated names likeoptions_MZdmTr6jNmZtxZhU5tjWzw_options
aren't that pretty.P.S. I'll try to provide a MR if I have time ;)
The text was updated successfully, but these errors were encountered: