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
-~----------~----~----~----~------~----~------~--~---

Reply via email to