abogushov / Django Admin Json Editor
Licence: mit
Adds json-editor for JSONField in Django Administration
Stars: ✭ 118
Programming Languages
python
139335 projects - #7 most used programming language
Projects that are alternatives of or similar to Django Admin Json Editor
Django Jsoneditor
Django JSONEditor input widget to provide javascript online JSON Editor
Stars: ✭ 124 (+5.08%)
Mutual labels: json, django
Django Import Export
Django application and library for importing and exporting data with admin integration.
Stars: ✭ 2,265 (+1819.49%)
Mutual labels: json, django
Jsonfield
A reusable Django model field for storing ad-hoc JSON data
Stars: ✭ 1,101 (+833.05%)
Mutual labels: json, django
Maria Quiteria
Backend para coleta e disponibilização dos dados 📜
Stars: ✭ 115 (-2.54%)
Mutual labels: django
Fetch Plus
🐕 Fetch+ is a convenient Fetch API replacement with first-class middleware support.
Stars: ✭ 116 (-1.69%)
Mutual labels: json
Purescript Simple Json
A simple Purescript JSON library that uses types automatically
Stars: ✭ 117 (-0.85%)
Mutual labels: json
Hearthstone Db
A JSON collection of all Hearthstone cards. Hearthstone database.
Stars: ✭ 117 (-0.85%)
Mutual labels: json
Groq
Specification for GROQ - Graph-Relational Object Queries
Stars: ✭ 117 (-0.85%)
Mutual labels: json
Django Jinja Knockout
Django datatables and widgets, both AJAX and traditional. Display-only ModelForms. ModelForms / inline formsets with AJAX submit and validation. Works with Django templates.
Stars: ✭ 116 (-1.69%)
Mutual labels: django
Kafka Connect Spooldir
Kafka Connect connector for reading CSV files into Kafka.
Stars: ✭ 116 (-1.69%)
Mutual labels: json
Drf Api Tracking
Fork of aschn/drf-tracking so that we can maintain and release newer versions
Stars: ✭ 117 (-0.85%)
Mutual labels: django
Hydroshare
HydroShare is a collaborative website for better access to data and models in the hydrologic sciences.
Stars: ✭ 117 (-0.85%)
Mutual labels: django
Administrative Divisions Of China
中华人民共和国行政区划:省级(省份直辖市自治区)、 地级(城市)、 县级(区县)、 乡级(乡镇街道)、 村级(村委会居委会) ,中国省市区镇村二级三级四级五级联动地址数据。
Stars: ✭ 11,727 (+9838.14%)
Mutual labels: json
Django Administration JSON Editor
Application adds support for editing JSONField in Django Administration via https://github.com/json-editor/json-editor.
Quick start
Install application via pip:
pip install django-admin-json-editor
Add application to the INSTALLED_APPS settings:
INSTALLED_APPS = [
...
'django_admin_json_editor',
...
]
Define schema of json field:
DATA_SCHEMA = {
'type': 'object',
'title': 'Data',
'properties': {
'text': {
'title': 'Some text',
'type': 'string',
'format': 'textarea',
},
'status': {
'title': 'Status',
'type': 'boolean',
},
},
}
Use JSONEditorWidget to bind editor to the form field:
class JSONModelAdminForm(forms.ModelForm):
class Meta:
model = JSONModel
fields = '__all__'
widgets = {
'data': JSONEditorWidget(DATA_SCHEMA, collapsed=False),
}
Dynamic schema
It is possible to build dynamic schema for widget:
def dynamic_schema(widget):
return {
'type': 'array',
'title': 'tags',
'items': {
'type': 'string',
'enum': [i for i in Tag.objects.values_list('name', flat=True)],
}
}
@admin.register(JSONModel)
class JSONModelAdmin(admin.ModelAdmin):
def get_form(self, request, obj=None, **kwargs):
widget = JSONEditorWidget(dynamic_schema, False)
form = super().get_form(request, obj, widgets={'tags': widget}, **kwargs)
return form
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].