well... maybe i missed something, but i've already tried
what u told me.
i copied and pasted the fieldsets from
django.contrib.auth.admin.UserAdmin
to my ProfessorAdmin class and i modified it in order to
add my custom fields in the formset i wanted.
well what i got is this error:
__________________________________________
Exception Type: ImproperlyConfigured
Exception Value: 'ProfessorAdmin.fieldsets[4][1]['fields']'
refers to field 'phone_number' that is
missing from the form.
__________________________________________
so i guess this is not the way at least not in this case
where i want to add fields from a custom user profile
into a certain fieldset of the UserAdmin class.
considering that the original fieldsets in UserAdmin
class is:
___________________________________________
fieldsets = (
(None, {'fields': ('username', 'password')}),
(_('Personal info'), {'fields': ('first_name', 'last_name',
'email')}),
(_('Permissions'), {'fields': ('is_staff', 'is_active',
'is_superuser', 'user_permissions')}),
(_('Important dates'), {'fields': ('last_login',
'date_joined')}),
(_('Groups'), {'fields': ('groups',)}),
)
___________________________________________
i would like to have something like:
___________________________________________
fieldsets = (
(None, {'fields': ('username', 'password')}),
(_('Personal info'), {'fields': ('first_name', 'last_name',
'email', 'phone_num', 'studio_address', 'site_url')}),
(_('Permissions'), {'fields': ('is_staff', 'is_active',
'is_superuser', 'user_permissions')}),
(_('Important dates'), {'fields': ('last_login',
'date_joined')}),
(_('Groups'), {'fields': ('groups',)}),
)
___________________________________________
with the fields 'phone_num', 'studio_address' and 'site_url'
from the Professor class (the custom user profile class)
into the 'Personal info' fieldset