Try abstract base class , implement and you do the model works , make composite pattern fine, after use django to this:
https://docs.djangoproject.com/en/1.10/topics/db/models/#abstract-base-classes The base it's: in the composite object you overwrite method of simple object. Em segunda-feira, 3 de outubro de 2016 18:08:13 UTC-3, Sylvain Dégué escreveu: > > Hi, > > I was wondering if it was possible to apply the Composite Pattern > <https://sourcemaking.com/design_patterns/composite> in the models. If > yes, how? > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a77debe8-f6f5-416b-a8b9-49db5cdaa96d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.