Hi,

I have a clients table, and I need each user to belong to a client. So
in fact what I need is to extend the user model with one additional
obligatory field.

I have already seen the UserProfile approach, but that is not
obligatory, meaning I can create a user without the profile, because
the profile is in another table, so this approach is not enough.

I have tried the idea in 
http://www.amitu.com/blog/2007/july/django-extending-user-model/,
but i keep getting this error:
'MyUserAdmin.fieldsets[4][1]['fields']' refers to field 'client' that
is missing from the form

The code that originate this is the definition of the fieldsets
following:

User.add_to_class('client',models.ForeignKey(Client))

class MyUserAdmin(UserAdmin):
    fieldsets = (
        (None, { 'fields': ('client', 'username', 'password') }),
        ) + UserAdmin.fieldsets[1:]
    list_display = ('client', ) + UserAdmin.list_display

Even if this get resolved how can I customize the User add in Admin to
have also the client, and not only the username and password.

Regards

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