Re: How to display UserProfiles in newforms-admin

2008-07-21 Thread [EMAIL PROTECTED]
On Jul 20, 4:22 pm, slav0nic <[EMAIL PROTECTED]> wrote: > #admin.py > from django.contrib import admin > from profile.models import UserProfile > from django.contrib.auth.models import User > > class ProfileInline(admin.StackedInline): > model = UserProfile > extra = 1 > max_num = 1 >

How to display UserProfiles in newforms-admin

2008-07-21 Thread Bernd Donner
In the old version of the admin site the fields of the UserProfile could be displayed "inline" on the corresponding User page of the admin site. This was done by somthing like: class UserProfile(models.Model): ... user = models.ForeignKey(User, unique=True, edit_inline=models.STACKED) How

Re: How to display UserProfiles in newforms-admin

2008-07-21 Thread Malcolm Tredinnick
On Sun, 2008-07-20 at 21:35 +0200, Bernd Donner wrote: > In the old version of the admin site the fields of the UserProfile could be > displayed "inline" on the corresponding User page of the admin site. This was > done by somthing like: > > class UserProfile(models.Model): > ... > user =

Re: How to display UserProfiles in newforms-admin

2008-07-20 Thread Adi J. Sieker
On Sun, 20 Jul 2008 21:35:44 +0200, Bernd Donner <[EMAIL PROTECTED]> wrote: > In the old version of the admin site the fields of the UserProfile could > be > displayed "inline" on the corresponding User page of the admin site. > This was > done by somthing like: > > class UserProfile(models

Re: How to display UserProfiles in newforms-admin

2008-07-20 Thread [EMAIL PROTECTED]
As long as it works(which I have every reason to believe it does), yes that looks like the best solution. On Jul 20, 4:25 pm, Bernd Donner <[EMAIL PROTECTED]> wrote: > Thanks for the link. Since UserAdmin is not directly under my control I came > up with the following solution: > > from django.co

Re: How to display UserProfiles in newforms-admin

2008-07-20 Thread Bernd Donner
Thanks for the link. Since UserAdmin is not directly under my control I came up with the following solution: from django.contrib.auth.admin import UserAdmin class UserProfile(models.Model): ... user = models.ForeignKey(User, unique=True, core=True) class UserProfileInline(admin.StackedInl

Re: How to display UserProfiles in newforms-admin

2008-07-20 Thread slav0nic
#admin.py from django.contrib import admin from profile.models import UserProfile from django.contrib.auth.models import User class ProfileInline(admin.StackedInline): model = UserProfile extra = 1 max_num = 1 class ProfileAdmin(admin.ModelAdmin): inlines = (ProfileInline,) admi