Thanks a lot, Rajesh. Excuse me, but one more question: When I edit/add the inherited class (for example: Student), everything goes well but the password field. It is not user friendly. So I try the following:
from django.contrib.auth.admin import UserAdmin admin.site.register(Student, UserAdmin) Then I try to add a new user again. It first shows a form request for username and password (twice), after I fill them up and click on save. An error come with "Student object with primary key u'7' does not exist." I found that, the new user has been created in admin/Users, but not in Student. Logan On Dec 4, 12:04 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Dec 3, 8:47 am, Logan Chow <[EMAIL PROTECTED]> wrote: > > > Hi Rajesh, > > That's the way I did. > > But I am wondering how I can hide the Users in admin site? > > You can unregister the default User model from the admin: > > from django.contrib import admin > from django.contrib.admin.sites import NotRegistered > from django.contrib.auth.models import User > try: > admin.site.unregister(User) > except NotRegistered: > pass --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---