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.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_yaml_field-0.1.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file django_yaml_field-0.1.1.tar.gz.

File metadata

  • Download URL: django_yaml_field-0.1.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for django_yaml_field-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0fbbc02961417ae1dedf6ea01b53ef91a06550691fb66ff9f86454e4a6540073
MD5 9ee9e952fbc343768f55a9d16a3bb2e6
BLAKE2b-256 8ba6764ebac9415215ad71a639cd253828e02f9934b2e67a4e4e9f6eaea9a312

See more details on using hashes here.

File details

Details for the file django_yaml_field-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_yaml_field-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 78f4983359fdaf3acb3474c0e44be277333c1d318035562853c02ee9e771f5e9
MD5 859b403644f0322c62e426ea4456053d
BLAKE2b-256 1661e2eb3857b2117eabd44e21428592de543f31f468cbb710dc375e45ee1570

See more details on using hashes here.

Supported by

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