On 10/12/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 10/10/05, Andy Todd <[EMAIL PROTECTED]> wrote: > > I'm trying to use different field names in my model from the database > > column names. Reading the manual I see that I can specify a db_column > > value in the field specification of my model classes which should > > enable me to do this. > > > > This doesn't seem to work though and the resulting object's attribute > > names are actually those of the database columns and not the field > > names I've specified in the class. Is this a bug? > > Not a bug -- the object's attributes are mapped to the column names. > > Adrian > > -- > Adrian Holovaty > holovaty.com | djangoproject.com | chicagocrime.org >
So if I have a column called currency_code in my database how do I refer to it as just 'code' in my class then? Or is this not possible? Regards, Andy -- >From the desk of Andrew J Todd esq