Skip to content

Commit

Permalink
Returning delta on str (#99)
Browse files Browse the repository at this point in the history
Returning delta on str for integration with DRF. Issue: #98
  • Loading branch information
Enzodtz authored Sep 20, 2024
1 parent 1681d59 commit 4c54683
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions django_quill/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ def __init__(self, instance, field, json_string):
self.json_string = json_string or '{"delta":"","html":""}'
self._committed = True

def __str__(self):
return self.delta

def __eq__(self, other):
if hasattr(other, "json_string"):
return self.json_string == other.json_string
Expand Down

0 comments on commit 4c54683

Please sign in to comment.