update to latest djangorestframework
diff --git a/xos/core/xoslib/methods/sliceplus.py b/xos/core/xoslib/methods/sliceplus.py
index c339789..aaf2917 100644
--- a/xos/core/xoslib/methods/sliceplus.py
+++ b/xos/core/xoslib/methods/sliceplus.py
@@ -12,25 +12,27 @@
if hasattr(serializers, "ReadOnlyField"):
# rest_framework 3.x
IdField = serializers.ReadOnlyField
+ WritableField = serializers.Field
else:
# rest_framework 2.x
IdField = serializers.Field
+ WritableField = serializers.WritableField
-class NetworkPortsField(serializers.WritableField): # note: maybe just Field in rest_framework 3.x instead of WritableField
+class NetworkPortsField(WritableField): # note: maybe just Field in rest_framework 3.x instead of WritableField
def to_representation(self, obj):
return obj
def to_internal_value(self, data):
return data
-class DictionaryField(serializers.WritableField): # note: maybe just Field in rest_framework 3.x instead of WritableField
+class DictionaryField(WritableField): # note: maybe just Field in rest_framework 3.x instead of WritableField
def to_representation(self, obj):
return json.dumps(obj)
def to_internal_value(self, data):
return json.loads(data)
-class ListField(serializers.WritableField): # note: maybe just Field in rest_framework 3.x instead of WritableField
+class ListField(WritableField): # note: maybe just Field in rest_framework 3.x instead of WritableField
def to_representation(self, obj):
return json.dumps(obj)