Re: database table prefix

2007-02-28 Thread TeLeNiEkO (Marc Fargas)
No, there's no global way. But django models know about SITE_ID so you should not care about this, depending on your scenario. Sites, Groups, Users, etc would be shared across all sites but every site will have it's own table for your applications if you take the "db_table = SITE_ID" approac

Re: database table prefix

2007-02-27 Thread Jason Sidabras
thanks! the db_table option will probably work. I might have to change the code unless there is a way to set this for a global db_table, such as the auth_user table. On Feb 27, 5:24 pm, "Marc Fargas Esteve" <[EMAIL PROTECTED]> wrote: > Prefixes have been discussed sometimes, you can look at

Re: database table prefix

2007-02-27 Thread Marc Fargas Esteve
Prefixes have been discussed sometimes, you can look at ticket #891 i.e. Or search this group about that... One "hackish" option you could go on is use different SITE_ID's in your sites, and either make your applications take care of SITE_ID (a foreignkey to Sites could help) or set the db_table

Re: database table prefix

2007-02-27 Thread Jason Sidabras
Sorry, mis-typed before. But I'm trying to see how this might work for my case. My mistake was that I am not trying to create multiple databases. Just multiple tables. So app named foo typically creates a table: foo_news and I would like it to be: site_one_foo_news Jason On Feb 27, 5:03 pm, "

Re: database table prefix

2007-02-27 Thread Rubic
You could assign DATABASE_PREFIX as an environment variable, then have settings.py get the value (untested): # settings.py import os DATABASE_PREFIX = os.environ['DATABASE_PREFIX'] DATABASE_NAME = "site_%s_foo" % DATABASE_PREFIX Then run manage.py from the command line: $ DATABASE_PRE

database table prefix

2007-02-27 Thread Jason Sidabras
Does django currently support a DATABASE_PREFIX option? The question arises because of a problem I am having with sqlite and my hosting provider. And the end of the day I would like to have three website which use some combinations of the same apps. These websites do not share "stories" from the