Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Problems with Admin interface and one-to-one rels [RSS Feed]

#1 Oct. 31, 2005 03:25:38

D.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Problems with Admin interface and one-to-one rels


I am a total newbie of Django and I am playing around with some of its
features.

When I added the admin interface via "class META: admin = meta.Admin()"
to the models as described in
<http://www.djangoproject.com/documentation/models/one_to_one/> I
cannot get the Admin interface to work properly with these models. I
either get errors or strange behavior.

Am I missing something in the META class to make it work properly with
these kind of models???

Dado

Offline

#2 Oct. 31, 2005 14:52:32

Adrian H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Problems with Admin interface and one-to-one rels


On 10/30/05, Dado <> wrote:
> When I added the admin interface via "class META: admin = meta.Admin()"
> to the models as described in
> <http://www.djangoproject.com/documentation/models/one_to_one/> I
> cannot get the Admin interface to work properly with these models. I
> either get errors or strange behavior.

It'd be a great help if you gave details about which errors and
strange behavior you got. Without that, we can't help much. :)

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Offline

#3 Oct. 31, 2005 16:08:57

D.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Problems with Admin interface and one-to-one rels


There are too many to list them all, it seems to me that one-to-one
rels are broken in the admin.

Anyway, as an example, and starting with a fresh database, I go to the
admin and start adding a restaurant. I press the "plus" image by the ID
field to add the corresponding place, a popup appears, I fill in the
fields and press save. The popup closes and I am back to the restaurant
adding page with the just entered place correctly displayed as ID
(indeed, there is a record now in the foo_places table). If I now press
save to save the restaurant I get the following error and a restaurant
row is not inserted: "Got unexpected keyword argument place__pk".

Hope this helps and thanx for your consideration,

Dado

Offline

#4 Nov. 1, 2005 17:19:04

D.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Problems with Admin interface and one-to-one rels


Adrian Holovaty wrote:
> On 10/30/05, Dado <> wrote:
> > When I added the admin interface via "class META: admin = meta.Admin()"
> > to the models as described in
> > <http://www.djangoproject.com/documentation/models/one_to_one/> I
> > cannot get the Admin interface to work properly with these models. I
> > either get errors or strange behavior.
>
> It'd be a great help if you gave details about which errors and
> strange behavior you got. Without that, we can't help much. :)
>
> Adrian
>
> --
> Adrian Holovaty
> holovaty.com | djangoproject.com | chicagocrime.org

Does this issue relate to this ticket?http://code.djangoproject.com/ticket/527I can add this related object just fine from a Python interactive
session and play around with them... they just don't work in the Admin.
The other issue I have is that unders restaurants all places are
listed... I would expect only places that are related to restaurants to
appear.

Just my 2c,

Dado

Offline

  • Root
  • » Django
  • » Problems with Admin interface and one-to-one rels [RSS Feed]

Board footer

Moderator control

Enjoy the 18th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support