aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/tests/relations_pk.py
diff options
context:
space:
mode:
authorTom Christie2013-02-07 09:14:58 +0000
committerTom Christie2013-02-07 09:14:58 +0000
commit5813a0951221f68591ade2039964531e754ca262 (patch)
tree64c991caa7e65dd94e397a9a7e478aa46a4ba290 /rest_framework/tests/relations_pk.py
parentc18fb0d6953940f63cd8747a5ce543d31999996f (diff)
downloaddjango-rest-framework-5813a0951221f68591ade2039964531e754ca262.tar.bz2
Use new many=True relations style.
Diffstat (limited to 'rest_framework/tests/relations_pk.py')
-rw-r--r--rest_framework/tests/relations_pk.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/tests/relations_pk.py b/rest_framework/tests/relations_pk.py
index ffd1127e..b8166d68 100644
--- a/rest_framework/tests/relations_pk.py
+++ b/rest_framework/tests/relations_pk.py
@@ -5,7 +5,7 @@ from rest_framework.tests.models import ManyToManyTarget, ManyToManySource, Fore
class ManyToManyTargetSerializer(serializers.ModelSerializer):
- sources = serializers.ManyPrimaryKeyRelatedField()
+ sources = serializers.PrimaryKeyRelatedField(many=True)
class Meta:
model = ManyToManyTarget
@@ -17,7 +17,7 @@ class ManyToManySourceSerializer(serializers.ModelSerializer):
class ForeignKeyTargetSerializer(serializers.ModelSerializer):
- sources = serializers.ManyPrimaryKeyRelatedField()
+ sources = serializers.PrimaryKeyRelatedField(many=True)
class Meta:
model = ForeignKeyTarget