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 = xxxx SITE_ID" approach mentioned above. Hope it works ;) Marc On 28 feb, 03:34, "Jason Sidabras" <[EMAIL PROTECTED]> wrote: > 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 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 Meta option > > something like: > > > from django.conf import settings > > db_tabe = 'this_app_table_site_%d' % settings.SITE_ID > > > but I'd rather make the applications understand SITE_ID and work > > accordingly. > > > Cheers, > > Marc > > > On 2/28/07, Jason Sidabras <[EMAIL PROTECTED]> wrote: > > > > 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, "Rubic" <[EMAIL PROTECTED]> wrote: > > > > 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_PREFIX="one" ./manage.py ... > > > > $ DATABASE_PREFIX="two" ./manage.py ... > > > > > -- > > > > Jeff Bauer > > > > Rubicon, Inc. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---