Skip to content Skip to sidebar Skip to footer
Showing posts with the label Mixins

Mixin Common Fields Between Serializers In Django Rest Framework

I have this: class GenericCharacterFieldMixin(): attributes = serializers.SerializerMethodField… Read more Mixin Common Fields Between Serializers In Django Rest Framework

Calling The Setter Of A Super Class In A Mixin

Suppose I have the following (not quite biologically correct) classes: class AnimalBaseClass: d… Read more Calling The Setter Of A Super Class In A Mixin

Decorators Versus Inheritance

How do you decide between using decorators and inheritance when both are possible? E.g., this probl… Read more Decorators Versus Inheritance