diff options
| author | Tom Christie | 2014-12-01 11:37:38 +0000 | 
|---|---|---|
| committer | Tom Christie | 2014-12-01 11:37:38 +0000 | 
| commit | 22c5b863bc395a6df84ec2536849540d3e92da7a (patch) | |
| tree | 419e04d196237913b4853c625d928582072e22a4 /rest_framework/serializers.py | |
| parent | b9503cd603613e4ae72b7718ba70a00b1537b289 (diff) | |
| download | django-rest-framework-22c5b863bc395a6df84ec2536849540d3e92da7a.tar.bz2 | |
More descriptive docstring on ModelSerializer
Diffstat (limited to 'rest_framework/serializers.py')
| -rw-r--r-- | rest_framework/serializers.py | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index de0d026d..3783b285 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -565,6 +565,14 @@ class ModelSerializer(Serializer):      * A set of default fields are automatically populated.      * A set of default validators are automatically populated.      * Default `.create()` and `.update()` implementations are provided. + +    The process of automatically determining a set of serializer fields +    based on the model fields is reasonably complex, but you almost certainly +    don't need to dig into the implemention. + +    If the `ModelSerializer` class *doesn't* generate the set of fields that +    you need you should either declare the extra/differing fields explicitly on +    the serializer class, or simply use a `Serializer` class.      """      _field_mapping = ClassLookupDict({          models.AutoField: IntegerField, | 
