Skip to main content

Same as Django JSONField but represent it as YAML (internally stores as JSON)

Project description

django-yaml-field

Same as Django JSONField but represent it as YAML (internally stores as JSON)

Pip install

pip install django-yaml-field

Example

from django.db import models
from django_yaml_field import YAMLField


class ModelName(models.Model):
	yaml = YAMLField()

Allows querying the stored data using lookups in the same way described in Django documentation

Syntax Highlight

If you want a nice syntax highlight in form, you can use with django-ace

from django_ace import AceWidget

@admin.register(ModelName)
class ModelName(admin.ModelAdmin):

	formfield_overrides = {YAMLField: {"widget": AceWidget(mode="yaml")}}

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_yaml_field-0.1.0.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

django_yaml_field-0.1.0-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page