On Tue, 2009-01-27 at 11:19 -0800, psj wrote: > Hi community -- > > All my models have some common fields, say "created_date" and > "last_modified_date". However, for various reasons not important here, > we have some naming conventions on column names: we like them to have > a prefix that pertains to the entity itself, so that the Account model > has db_column="ac_created_date" and the Category model has > db_column="ct_created_date". > > It seems that the "common fields" scenario is a prime candidate for > the Abstract Base Class model inheritance scenario, but I'm having > some difficulty making the ABC mechanism work with these custom > db_column values. > > Creating a class method that returns the Model's preferred prefix > doesn't seem to work, as the inherited models seem to get the prefix > of the abstract class. > > Am I missing a straightforward way of doing this?
No, you're not missing a straightforward way. That behaviour isn't supported. It would be a little fiddly to add, but not impossible. Not sure it's really worth it for Django's core, however, since it's an edge-case and ABC's are only a convenience, not a requirement. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---