On 8/4/06, patrickk <[EMAIL PROTECTED]> wrote:
> we´d really appreciate some help with this problem:

Hi Patrick,

Here's a few thoughts.

> 1. we´re having several sites sharing basic userdata (first name,
> last name, username ...) - so every user can login to all of the
> sites using the same login/password.

> 2. every site has a specific userprofile (e.g. newsletter for that
> site, ...)

I'm supposing you mean that, on each site, each user will have a
specific profile that is not shared with other sites.

> now, we have to extend the user-model ... either with one-to-one or
> foreignkey at the moment.

The interesting thing about using a foreign key that points to the
user table is that it doesn't change the db schema for the user table,
so it's quite a light-weight solution.

> and here are the questions:
> how are we able to show the data from userprofile (together with the
> basic userdata) in the admin-interface (I think that´s only possible
> with using foreignkey, right)?

I believe so, setting edit_inline parameter, as shown in the second
part of the Django tutorial.

> how can we create filters from the userprofile within the userdata
> (e.g., who wants to have a newsletter for site xxx)?

Well, it depends on your model. I find it best fire up the shell
("python manage.py shell"), import my model classes and just play with
it until I get the results I want. I imagine it will be something
along the lines of:

site = newsletter.site
User.objects.all(profile__site = site.id)

HTH,

Alan.



> I´m not even sure whether combining userdata for several sites is a
> good idea in the first place, but our customer wants to have that.
> maybe there are other ways of synchronizing userdata I haven´t
> thought about ... suggestions are more than welcome.
>
> hope I put the issue across ...
>
> thanks,
> patrick
>
> >
>


-- 
Alan Green
[EMAIL PROTECTED] - http://bright-green.com

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

Reply via email to