You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With inheritance, e.g. Writing, Event, etc all inheriting from Content. Creating Writing doesn't trigger (or implement) the admin mixin applied to the Content model. They add with the default value '0'. And subsequently can't be updated, as there are too many with the value of '0'. How should we trigger this to resort (similar to the management command) after save?
class Content(models.Model):
sort_order = models.PositiveIntegerField(default=0, db_index=True)
...
class Writing(Content):
....
The text was updated successfully, but these errors were encountered:
Could you please fork the project and create a polymorphic model where this problem occurs. For instance by separating Book from Magazin (a magazin doesn't have an author but a publisher). I then can look for a solution and use that as a starting point to implement a unit test.
With inheritance, e.g. Writing, Event, etc all inheriting from Content. Creating Writing doesn't trigger (or implement) the admin mixin applied to the Content model. They add with the default value '0'. And subsequently can't be updated, as there are too many with the value of '0'. How should we trigger this to resort (similar to the management command) after save?
The text was updated successfully, but these errors were encountered: