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
>
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
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 =
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
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
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
#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
7 matches
Mail list logo