On Sun, 15 Nov 2009 15:20:32 -0800, Christophe Pettus <[email protected]> wrote: > On Nov 15, 2009, at 2:35 PM, Melvyn Sopacua wrote: >> Is it possible for a "Django appointments application" to understand >> and use >> the geographical information from the tables in the geo_regionX >> schema and >> equally important to treat that specific schema as read only, as the >> data is >> kept up-to-date by other means? > > > First, it's important to be sure we know what you mean by > "application." In Django terminology, an application is a sub- > component of a project; a project corresponds to what many people mean > when they say "web application."
No, I was thinking in Django applications - actually in web applications in general, since I'm not convinced yet Django is the right tool for the job, but it's project vs application design is exactly how I had it in mind. It's a little more complicated by the fact, that some datasets are related, but not necessarily the same, as is the case with available geodata per region (different providers use different names for the same meta-data, though I may need to pre process and standardize it for my own sanity). > The reason this matters is each Django project connects to PostgreSQL > as a single user, so any role-based authentication will be uniform > across everything inside of that project. If each of the > "applications" you are talking about are a different Django project, > you can have each connect as a different user with different > PostgreSQL permissions. > > Assuming that you are able to use role-based permissions, you can set > each user to have its own schema search path, and thus make visible to > each user only the schemas that you want that particular user to see. > > Django does not, right now, have the ability to qualify table > references with schemas, so the search path is the only practical > method for using multiple schemas with Django. So, if I gather this correctly, anything Django's project user can see, it will try to model and manage on syncdb. Am I correct in assuming that it's unique project ID, filters data in a given application, so that for instance user Bob can exist both in project X and Y, be different, but stored in the same auth.users table? Also, if inter-schema foreign keys already exist, will this confuse Django? At first glance it seems that the 'Application.field' syntax for the ForeignKey method introduces a few problems, unless I strictly adhere to the "Django Application equals PostgreSQL Schema" design. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. 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=.

