aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/serializers.py
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework/serializers.py')
-rw-r--r--rest_framework/serializers.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py
index 0faad703..5c91fee3 100644
--- a/rest_framework/serializers.py
+++ b/rest_framework/serializers.py
@@ -304,6 +304,13 @@ class ModelSerializer(Serializer):
"""
Return all the fields that should be serialized for the model.
"""
+ # TODO: Modfiy this so that it's called on init, and drop
+ # serialize/obj/data arguments.
+ #
+ # We *could* provide a hook for dynamic fields, but
+ # it'd be nice if the default was to generate fields statically
+ # at the point of __init__
+
cls = self.opts.model
opts = get_concrete_model(cls)._meta
pk_field = opts.pk