You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
We need something a little meaningful so the example consists of some simple models in a class heirarchy and an associated heirarchy of model serializers<supid="n1">[1](#f1).
4
4
5
-
The ??first commit shows how serializers need to be accessed for the model classes in order to serialize/deserialize model data.
5
+
The first commit shows how serializers need to be accessed for the model classes in order to serialize/deserialize model data.
6
6
7
7
Maintaining the serializer_class_map quickly becomes cumbersome.
8
8
@@ -17,7 +17,7 @@ but this is repeating the association because its already present in the Meta (s
17
17
18
18
We could add a serializer_class field to the models but this is coupling the serializers to the models in an undesirable way. We want to keep the serialization concern to our serializers.
19
19
20
-
So how about a metaclass?
20
+
##So how about a metaclass?
21
21
If we specify a metaclass for our serializers we can update the serializer_class_map whenever we create a new serializer class.
0 commit comments