admin: show prettified yaml

This commit is contained in:
Jens Langhammer 2020-02-23 15:27:11 +01:00
parent d6fdcd3ef9
commit 6b8a59cfbd

View file

@ -48,7 +48,7 @@ class YAMLField(forms.CharField):
def prepare_value(self, value):
if isinstance(value, InvalidYAMLInput):
return value
return yaml.dump(value, explicit_start=True)
return yaml.dump(value, explicit_start=True, default_flow_style=False)
def has_changed(self, initial, data):
if super().has_changed(initial, data):