Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

aldpuzz/django-yaml-field

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%