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 On 28 Nov, 14:27, sergioh <[EMAIL PROTECTED]> wrote: > You could use field sets to get your information organized: > > fieldsets = ( > ('Account Information', { 'fields':('company_name', > 'username', > 'password', 'email', 'is_active')}), > ('Company Information',{'fields': ('physical_address', > 'city', 'state', 'zip_code', 'telephone', 'fax', 'type_of_business', > 'years_in_business')}), > ('Billing Information',{'fields': ('billing_address', > 'billing_city', 'billing_state', 'billing_zip_code')}), > ) > > Regards, > > Sergio Hinojosa > > mondonauta wrote: > > hello everybody, > > i've already created a custom user profile > > and added it to the User by > > foreignkey, AUTH_PROFILE_MODULE > > and i have been able to add the custom profile > > to the admin page by coding in admin.py this: > > > ___________________________________________ > > from django.contrib import admin > > from django.contrib.auth.models import User > > from django.contrib.auth.admin import UserAdmin > > > from django.utils.translation import ugettext_lazy as _ > > > from ProfSystem.users.models import Professor > > > admin.site.unregister(User) > > > # Set it up so we can edit a user's professor profile inline in the > > admin > > class ProfessorInline(admin.StackedInline): > > model = Professor > > > class ProfessorAdmin(UserAdmin): > > inlines = [ProfessorInline] > > > # re-register the User with the extended admin options > > admin.site.register(User, ProfessorAdmin) > > _____________________________________________ > > > now my problem is that in this way the new fields > > r in a new frameset at the bottom of the admin page! > > while what i would like to do is adding the new fields > > to the "Personal info" frameset. > > is there any way to obtain this? > > > thanks for any one who is going to help me :-) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---