Hi, Is it a good way to extend Django User model using add_to_class()? I have to add only two extra fields to the User model and I think that using Profile Model to do this is unnecessary.
My way: # Accounts models.py User.add_to_class('field1', models.CharField(max_length=255)) User.add_to_class('field2', models.CharField(max_length=255)) # Accounts admin.py class CustomUserAdmin(UserAdmin): fieldsets = ( (None, {'fields': ('username', 'password')}), (_('Personal info'), {'fields': ('email',)}), (_('Permissions'), {'fields': ('is_staff', 'is_active', 'is_superuser', 'user_permissions')}), (_('Important dates'), {'fields': ('last_login', 'date_joined')}), (_('Groups'), {'fields': ('groups',)}), (_('MyExtraFields'), {'fields': ('field1', 'field2')}), ) admin.site.unregister(User) admin.site.register(User, CustomUserAdmin) Finally: > python manage.py syncdb Thank You, 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---