Thank you for quick response. Russell Keith-Magee wrote: > On 11/6/06, Martin Bačovský <[EMAIL PROTECTED]> wrote: > >> I have two questions I was unable to google: >> - Is Django going to support database views? >> > > We don't have any immediate plans to support views; however, if > someone were to provide a patch that implemented the. > > As I will need this feature I will try to do that. >> - Does Django support postgres database schema? I tried to add Meta >> class with db_table = 'my_sch.my_table' in my model, but unfortunately >> this is quoted by Django. >> > > I'm a little unclear what you mean here. You should be able to point > Django at a legacy table without too much difficulty (as long as your > Django model definition is compatible with the existing table). If you > are having problems with quoting of table names, I would be interested > in hearing details. > By database schema I mean postgres feature described here: http://www.postgresql.org/docs/8.1/interactive/ddl-schemas.html.
I think that use of schema instead of prefixing would lead to more clean and better organised db design. E.g. polls.poll instead of polls_poll. At first it doesn't look like a big deal, but it is more natural. When you have big db model and need to access db from other sources then Django it can do things easier. I can't imagine all consequences yet. but I think that adding db_schema attribute to Meta class and something like: table_name = '%s.%s' % (quote(db_schema),quote(db_table)) # for postgres table_name = '%s_%s' % (quote(db_schema),quote(db_table)) # otherwise would do that. Ideas? Martin --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---