django-yaml-field-0.1.0
توضیحات
Same as Django JSONField but represent it as YAML (internally stores as JSON)
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | django-yaml-field-0.1.0 |
| نام | django-yaml-field |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Kalinin Mitko |
| ایمیل نویسنده | kalinin.mitko@gmail.com |
| آدرس صفحه اصلی | https://github.com/null-none/django-yaml-field |
| آدرس اینترنتی | https://pypi.org/project/django-yaml-field/ |
| مجوز | - |
# django-yaml-field
Same as Django JSONField but represent it as YAML (internally stores as JSON)
### Pip install
```bash
pip install django-yaml-field
```
### Example
```python
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](https://docs.djangoproject.com/en/4.0/topics/db/queries/#querying-jsonfield)
### Syntax Highlight
If you want a nice syntax highlight in form, you can use with [django-ace](https://github.com/django-ace/django-ace)
```python
from django_ace import AceWidget
@admin.register(ModelName)
class ModelName(admin.ModelAdmin):
formfield_overrides = {YAMLField: {"widget": AceWidget(mode="yaml")}}
```
### License
MIT
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl django-yaml-field-0.1.0:
pip install django-yaml-field-0.1.0.whl
نصب پکیج tar.gz django-yaml-field-0.1.0:
pip install django-yaml-field-0.1.0.tar.gz