Skip to content

Commit a8d8e63

Browse files
authored
Merge pull request #13 from chubz/master
Problem with widget rendering passed schema
2 parents 1be4269 + 80c2bcb commit a8d8e63

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

django_admin_json_editor/admin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from django import forms
55
from django.utils.safestring import mark_safe
66
from django.template.loader import render_to_string
7+
import json
78

89

910
class JSONEditorWidget(forms.Widget):
@@ -28,7 +29,7 @@ def render(self, name, value, attrs=None, renderer=None):
2829

2930
context = {
3031
'name': name,
31-
'schema': schema,
32+
'schema': json.dumps(schema),
3233
'data': value,
3334
'sceditor': int(self._sceditor),
3435
}

0 commit comments

Comments
 (0)