mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Fixed #27922 -- Added ErrorDict.get_json_data().
This commit is contained in:
@@ -51,8 +51,11 @@ class ErrorDict(dict):
|
||||
def as_data(self):
|
||||
return {f: e.as_data() for f, e in self.items()}
|
||||
|
||||
def get_json_data(self, escape_html=False):
|
||||
return {f: e.get_json_data(escape_html) for f, e in self.items()}
|
||||
|
||||
def as_json(self, escape_html=False):
|
||||
return json.dumps({f: e.get_json_data(escape_html) for f, e in self.items()})
|
||||
return json.dumps(self.get_json_data(escape_html))
|
||||
|
||||
def as_ul(self):
|
||||
if not self:
|
||||
|
||||
Reference in New Issue
Block a user