Awesome. Thanks Doug.

That's precisely what I've been working towards over the last couple
of hours, but didn't know about search paths in Postgres. I was trying
to handle it within Django by prefixing a "SCHEMA_PREFIX" to the table
name on my own app models (of which there aren't many).

Unfortunately it didn't work anyway. Django's escaping of the SQL
arguments means you end with a table called "SCHEMA_PREFIX.model" in
the public schema.

I'll do it your way.

Nick

On Apr 25, 1:29 pm, Doug Van Horn <[EMAIL PROTECTED]> wrote:
> On Apr 24, 5:59 pm, Nick Tidey <[EMAIL PROTECTED]> wrote:
>
> > Thanks for the help Robin. I'm new to Python also, so wasn't too sure
> > about how to reuse the apps.
>
> > I'll see if I can't use triggers to propagate the user information
> > between databases. Unless there's a better way?
>
> You could install your common django applications (auth, sites,
> sessions, etc.) into the public schema.  Then give each domain their
> own schema in which to install their tables (say, foo_tld).  Then, set
> each domain database user's "search_path" equal to "foo_tld,public".
> Give each domain their own settings.py and their own database user,
> and you should be good to go.
>
> That would let you share the common tables across the different
> projects, but each domain/schema/database user would have their own
> set of tables and data.
>
> I've done this before in PostgreSQL.  I don't know how MySql would
> handle something like this.
>
> FWIW,
>
> doug.


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