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
Built Distribution
File details
Details for the file django_yaml_field-0.1.0.tar.gz
.
File metadata
- Download URL: django_yaml_field-0.1.0.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7965940a277f89d875393c3b84cd24d0c70018d37db0503cd95ae2b9106a5e08 |
|
MD5 | fb8949f80101b82a60c9d54822b89337 |
|
BLAKE2b-256 | c6733ed14a81e6d730d74c031459a61b555bfff8bb5a30fef4d4da9ea1826312 |
File details
Details for the file django_yaml_field-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: django_yaml_field-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c6514d6aad2d4740998c939fe428859f7fca7b1b62a722e7e01c254294b9465 |
|
MD5 | ed70e2edc4996bb768bd32fec15338b4 |
|
BLAKE2b-256 | e1c47d793bcc26b9e98d68db230029fcaa700c65f3760594c1a87b53c7941870 |