On Sun, May 8, 2011 at 12:00 AM, Oleg Lomaka wrote:
> You have started from the beginning. Take a look at my very first reply in
> this thread. Remove 'areacode' and 'number' fields from your MemberAdmin.
> Let them be available from PhoneInline and AddressInline. You will
You have started from the beginning. Take a look at my very first reply in
this thread. Remove 'areacode' and 'number' fields from your MemberAdmin.
Let them be available from PhoneInline and AddressInline. You will be see
them on the same admin page, just in other visual block where inline forms
Hi Oleg,
Thanks for your patience. I'm pretty sure I DID miss something like
you said. Here's my admin.py, with the modifications you suggested:
# admin.py
from django.contrib import admin
from django.contrib.auth.models import User
from models import Member, Address, Phone
class
If you get the same error, the you have missed something. Show me your
current admin.py once more.
As to "I'd like to be able to access the fields from the Phone and
Address model from the MemberAdmin model". You can access fields from Phone
and Address from the InlineAdminModel. That is in case
This doesn't do anything. I still get the same error.
I'd like to be able to access the fields from the Phone and Address
model from
the MemberAdmin model. I still cannot do this. Any other way?
Eiji
On May 7, 7:22 am, Oleg Lomaka wrote:
> Move fields from ModelAdmin to
Move fields from ModelAdmin to appropriate InlineModelAdmin
#admin.py
from models import Member, Address, Phone
class PhoneInline(admin.StackedInline):
model = Phone
can_delete = True
extra = 0
fields = ('areacode', 'number')
class AddressInline(admin.StackedInline):
model =
Hi!
I'm having trouble figuring out what to do.
I have multiple models linked together using foreignkey, like the following:
# models.py
class Member(User):
middle_name = models.CharField(max_length=20)
class Phone(models.Model):
owner = models.ForeignKey(Member)
areacode =
7 matches
Mail list logo