The problem with this solution is that you are unable to sort and/or
filter by anything you "wire" to the User admin page. #9463 is one I
have posted a bit ago.

On Dec 9, 9:43 am, "Ronny Haryanto" <[EMAIL PROTECTED]> wrote:
> On Tue, Dec 9, 2008 at 8:58 PM, mahesh <[EMAIL PROTECTED]> wrote:
> > How do wire Userprofile to UserAdmin ?
>
> Here's one way to do it:
>
> # admin.py
> from django.contrib import admin
> from django.contrib.auth.admin import UserAdmin
> from django.contrib.auth.models import User
>
> from myproj.myapp.models import UserProfile
>
> class UserProfileAdminInline(admin.TabularInline):
>     model = UserProfile
>
> class NewUserAdmin(UserAdmin):
>     inlines = [UserProfileAdminInline]
>
> admin.site.unregister(User)
> admin.site.register(User, NewUserAdmin)
>
> Ronny
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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