<s> from wq . db . rest . serializers import ModelSerializer <EOL> from . models import OneToOneModel , ExtraModel , Child <EOL> class RootModelSerializer ( ModelSerializer ) : <EOL> extramodels = ModelSerializer . for_model ( ExtraModel ) ( many = True ) <EOL> onetoonemodel = ModelSerializer . for_model ( OneToOneModel ) ( ) <EOL> class ChildSerializer ( ModelSerializer ) : <EOL> class Meta : <EOL> model = Child <EOL> exclude = ( '<STR_LIT>' , ) <EOL> class ParentSerializer ( ModelSerializer ) : <EOL> children = ChildSerializer ( many = True ) </s>
