ref: context value "id"

This commit is contained in:
relikd
2024-07-03 00:14:42 +02:00
parent ce33e15a59
commit cc8833037f
2 changed files with 5 additions and 4 deletions

View File

@@ -28,6 +28,7 @@ class MapLocationWidget(Widget):
def get_context(self, name, value, attrs):
context = super().get_context(name, value, attrs)
context['id'] = context['widget']['attrs']['id']
context['map_options'] = json.dumps(
context['widget']['attrs'].get('options'))
return context