﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
7588	Inheritance of models seems to fail when mixing abstract and multi table classes	zobbo	nobody	"Execute the following with the following models table
{{{
pi = PlayableItem(funfactor=33,code='PS2',description='Play station 2') 
}}}
You'll get the error back 
{{{
TypeError: 'code' is an invalid keyword argument for this function
}}}
models.py is
{{{
from django.db import models 
import datetime 

class BaseModel(models.Model): 
    """"""Abstract class used for some common fields"""""" 
    created_at = models.DateTimeField(blank=True, default=datetime.datetime.now) 
    modified_at = models.DateTimeField(blank=True, default=datetime.datetime.now) 
    class Meta: 
        abstract = True 

class Item(BaseModel): 
    """"""Everything in the system - multi table inheritance"""""" 
    code = models.CharField(blank=True, max_length=15) # A shortname 
    description = models.CharField(blank=True, max_length=50) 

class ValuedItem(Item): 
    """"""This is an abstract base class for stuff with a value"""""" 
    value = models.FloatField(default=0.0) 
    class Meta: 
        abstract = True 

class PlayableItem(ValuedItem): 
    """"""Inheriting from our abstract ValuedItem class"""""" 
    funfactor = models.IntegerField(blank=True, null=True) # Amount of fun
}}}

This is a simplified mockup of something I was trying to do for real with various abstract and multi table classes. I made this test version just to reproduce and report the error. Having enquired in django-users was advised to file a bug report. 

This is with checkout from svn - Revision: 7811. psycopg2 backend. python2.5
"		closed	Database layer (models, ORM)	dev		fixed	model inheritance	flosch	Accepted	1	0	1	0	0	0
