#28332: Cannot get diamond multiple inheritance example to work
-----------------------------------------+------------------------
Reporter: Luc Saffre | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.11
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
I need help with getting to test some code which is AFAICS equivalent to
the second example (Piece, Book, Article, BookReview) of the
[https://docs.djangoproject.com/en/1.11/topics/db/models/#multiple-
inheritance Multiple inheritance] section of the Models topic guide.
To reproduce my problem, please download the following files from
[https://github.com/lino-framework/book/tree/master/docs/tested/diamond
this directory] of my repository:
- [https://github.com/lino-
framework/book/blob/master/docs/tested/diamond/main/models.py
main/models.py]
- `main/__init__.py`
- `manage.py`
- `settings.py`
and then run:
{{{
$ python manage.py check
}}}
The output is:
{{{
SystemCheckError: System check identified some issues:
ERRORS:
main.PizzeriaBar: (models.E005) The field 'restaurant_ptr' from parent
model 'main.bar' clashes with the field 'restaurant_ptr' from parent model
'main.pizzeria'.
}}}
The failure works in Django versions 1.11.2, 1.10.7, 1.9.13 (and maybe
earlier as well).
I could not find any relevant difference between my code and the example
in the documentation.
Any hints?
--
Ticket URL: <https://code.djangoproject.com/ticket/28332>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/050.0a1ec97ea7e6e2f49022f6d7e834244f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.