1👍
Django won’t automatically downcast models. I found a post by Jeff Elmore on the automatic downcasting of models helpful. In it he mentions django-model-utils and django-polymorphic-models as well as providing his own solution (https://bitbucket.org/Enzondio/django-model-utils/overview).
0👍
This looks very weird. Why would you work with inheritance here? In django every model is a table in your database (or almost every model is, unless it has abstract=True
in its meta settings). Your query yields the right results (assuming you have changed the standard objects
manager for the modules
you are using here), because the only things related to Dashboard is DashoardModule. Rethink the architecture in function of what you want your database to look like.
Check the following links:
- [Answer]-Django queryset – filter/exclude by sum over column
- [Answer]-Avoiding race conditions, Django + Heroku + PostgreSQL
- [Answer]-How to save foreign key referenced model instance when parent model instance is created in Django
- [Answer]-Django-pyodbc DatabaseError message is wired
- [Answer]-What is "FOO_set" attributes in a model?