Hi,
I hope someone can give me a hand.
I'd like to have a *single* UserProfile table/model which is *shared*
across many apps, much like auth_user is.
--- setup info ---
Django 1.2.1 on a recent Linux system. All pretty up-to-date.
One project (X). Many apps (A,B,C). The url, say: *.home.box, where I
have setup fake (/etc/hosts) subdomains to localhost as A.home.box etc.
I have an Apache VirtualHost per name and they each point to a .wsgi
file which, in turn, points to a settings_*.py file per name.
(I *think* this all means each "app" is running in a kind of sandbox --
I really don't know what apache processes are -- so it's like three
different web-sites all running from a (mostly) common directory
structure and each one has a single instance of the settings pertinent
to it.)
This, astonishingly, seems to work. All good so far.
--- ---
If a user who is not logged-in (i.e. no cookie) hits A|B|C.home.box I'd
like them to get sent to A.home.box/login
Once they are logged-in, they should be able to visit B|C.home.box
So far they all have one table; the auth_user one. I have a sqlite db
which all three apps share.
I'd like to have a single UserProfile table/model which is shared across
all three apps.
I tried the way the docs suggest and used AUTH_PROFILE_MODULE, but that
gets wired to 'A' (for example) but then I can't seem to get_profile()
from request.user in views in B or C (I get some kind of can't find
A.UserProfile error.)
I did manage to get A_userprofilebase, B_userprofile and C_userprofile
-- but that's three tables! I have not yet hacked a way to reach the
user profile from the user.
(I am doing this by subclassing a model: A has the main class,
userprofilebase, with all the profile fields. B and C subclass that as
userprofile.)
I don't know quite what this will all mean for situations like deleting
a user -- I'd have to go look in three places to completely delete their
profile too.
I need to restrict who can visit what 'sites' (some users can hit B,
some C and some both), so the profile table would hold info about this
kind of thing.
Right, clear as mud I hope :)
\d
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.