django-yamlfield¶
A Django database field for storing YAML data
Getting started¶
Install this module
pipenv install django-yamlfield
Add it to one of your models.
from django.db import models
from yamlfield.fields import YAMLField
class YourModel(models.Model):
data = YAMLField()
That’s it! You can now start storing Python objects as YAML.
obj = YourModel.objects.create(
data={"a": "foo", "b": "baz"}
)