This commit is contained in:
Tom Christie 2012-11-02 20:56:51 +00:00
parent 6eaec7a0ec
commit 8ec54e6a9f
3 changed files with 4 additions and 4 deletions

View File

@ -344,7 +344,7 @@ class ManyRelatedField(ManyRelatedMixin, RelatedField):
"""
Base class for related model managers.
If not overridden, this represents a to-many relatinship, using the unicode
If not overridden, this represents a to-many relationship, using the unicode
representations of the target, and is read-only.
"""
pass

View File

@ -32,10 +32,10 @@ def main():
'Function-based test runners are deprecated. Test runners should be classes with a run_tests() method.',
DeprecationWarning
)
failures = TestRunner(['rest_framework'])
failures = TestRunner(['tests'])
else:
test_runner = TestRunner()
failures = test_runner.run_tests(['rest_framework'])
failures = test_runner.run_tests(['tests'])
cov.stop()
# Discover the list of all modules that we should test coverage for

View File

@ -38,7 +38,7 @@ class ForeignKeySource(models.Model):
class ForeignKeyTargetSerializer(serializers.ModelSerializer):
sources = serializers.ManyPrimaryKeyRelatedField(queryset=ForeignKeySource.objects.all())
sources = serializers.ManyPrimaryKeyRelatedField(read_only=True)
class Meta:
model = ForeignKeyTarget