home / django_tickets / tickets

tickets: 8444

This data as json

id created changetime last_pulled_from_trac stage status component type severity version resolution summary description owner reporter keywords easy has_patch needs_better_patch needs_tests needs_docs ui_ux
8444 2008-08-20 09:58:45 2008-08-20 13:58:57 2022-03-06 03:42:17.382796 Unreviewed closed Core (Other)     dev invalid Model inheritance - inherited model could use some fields cleanup This is not important, just a little strange (IMHO). I have following scenario: {{{ class Question(models.Model): ... class UserQuestion(Question): ... class WebQuestion(Question): ... >>> q = Question.objects.all()[0] >>> dir(q) [... 'userquestion', ..., 'webquestion'] - OK }}} {{{ >>> dir(q.userquestion) [...'userquestion', ..., 'question_ptr', 'question_ptr_id', ..., 'webquestion'] }}} Two issues: - Why to have userquestion again? - this looks odd: {{{ >>> q.userquestion.userquestion }}} - Is it possible to have model instance which has multiple inheritance (one question is userquestion and webquestion in the same time)? - if not why to have webquestion? nobody trebor74hr model inheritance 0 0 0 0 0 0
Powered by Datasette · Queries took 1.642ms