Django-polymorphic and abstract parent class? -
i have never used django-polymorphic lib in projects, have important questions experience.
1) possible set parent class abstract? in project need easy access children objects, this:
>>> project.objects.all() >>> [ <xxxproject: id 1, topic "department party">, <artproject: id 2, topic "painting tim", artist "t. turner">, <researchproject: id 3, topic "swallow aerodynamics", supervisor "dr. winter">]
and important me avoid inner join, thinking write 1 big model possible attributes, , next design proxy models. other solution polymorphic lib, perfect if make parent class abstract. solutions better , why in opinion?
2) how expensive use polymorphic lib in practice? how perceive lib on production projects? potential bottleneck of performance?
Comments
Post a Comment