How to extend django.contrib auth and admin.

Hi,

I would like to extend "auth.user" from django.contrib auth and admin.
I would like to add one more field in user.

models.py (added Code)
from django.contrib.auth import models as auth_models

gender = (
                ('M', 'Male'),
                ('F', 'Female'),
        )

class Polster(auth_models.User):
        sex = models.CharField(max_length=1, choices=gender

admin..py (added code)

class PolsterAdmin(auth_admin.UserAdmin):
        fieldsets = [
                (None, {'fields':['sex']}),
                ]
admin.site.register(Polster, PolsterAdmin)


Upon hitting I expect Usefadmin is replace by my additional field; I
get this error; I suspect I need to create one more class relating to
form; Please guide me;

ImproperlyConfigured: 'PolsterAdmin.fieldsets[0][1]['fields']' refers
to field 'sex' that is missing from the form.

Thank You in Advance
-Mahesh


-- 
--Mahesh
Bangalore

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