Skip to content

Commit f919ee7

Browse files
author
Mohammed Hammoud
committed
Add JSONSerializerField
1 parent 96b362c commit f919ee7

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

__init__.py

Whitespace-only changes.

payments/api/__init__.py

Whitespace-only changes.

payments/api/abstract.py

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from rest_framework import serializers
2+
3+
4+
class JSONSerializerField(serializers.Field):
5+
""" Serializer for JSONField -- required to make field writable"""
6+
7+
def to_internal_value(self, data):
8+
return data
9+
10+
def to_representation(self, value):
11+
return value

0 commit comments

Comments
 (0)