Wednesday, August 23, 2017¶
About diamond inheritance¶
Thanks to Jeremy Satterfield who looked at Django ticket 28332 and posted a pull request which gets the example to work. Thanks also to SmileyChris who suggested to add an explanation “Or use a common ancestor to hold the AutoField, using an explicit OneToOneField between the parent and root models to avoid a clash between the ones that would be automatically created” to the docs page.
My Diamond inheritance example now passes using Jeremy’s method. But in Diamond inheritance we still have the problem of Django saying:
django.core.exceptions.FieldError: Local field u'street' in class
'PizzeriaBar' clashes with field of the same name from base class
'Pizzeria'.
This problem comes because we additionally to simple diamond inheritance the field street is defined in a parent of the common parent. Django then gets messed up when testing for duplicate fields and incorrectly thinks that street is duplicated.
All this is our ticket #1908. Which I put to sleep now because we currently have no use case for getting diamond inheritance working. The last case, if I remember well, was with some intermediate solution for Lino Tera where lists.List inherited from both Client and Partner. But that solution was ill anyway.
Cannot query “ALTENBERG Hans (114)”: Must be “Course” instance¶
I fixed #2014 for Lino Tera (ValueError: Cannot query “ALTENBERG Hans (114)”: Must be “Course” instance).
Hangout with Tonis¶
Tonis and I had another Hangout where we worked on #1545 (for which Tonis found a satisfying workaround), #2015 and #2011.
We also spoke about my newest idea (#2013) and hope that this is the right job for Hamza who will enjoy getting away from JavaScript and back to Python.