Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » OneToOne relations broken (#527), any workarounds ? [RSS Feed]

#1 Nov. 15, 2005 09:05:29

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

OneToOne relations broken (#527), any workarounds ?


Hi, i'm trying to use OneToOne relation on new-admin branch and as of
rev 1238 i'm getting this error when updating UserDetail entry in
auto-admin

Request Method: POST
Request URL:http://192.168.1.156:8000/admin/intranet/userdetails/1/Exception Type: TypeError
Exception Value: got unexpected keyword argument 'user__pk'
Exception Location:
/usr/lib/python2.4/site-packages/django/core/meta/__init__.py in
_throw_bad_kwarg_error, line 1375

Is something could be done for now with this as a temporary workaround
until #527 solved ? Used model is below

from django.core import meta
from datetime import datetime
from django.models.auth import User

class PolicyCategory(meta.Model):
name = meta.CharField(maxlength=100);
class META:
admin = meta.Admin()

class UserDetail(meta.Model):
user = meta.OneToOneField(User)
policy_categories = meta.ManyToManyField(PolicyCategory,
blank=True)
class META:
admin = meta.Admin()

Offline

#2 Nov. 16, 2005 09:50:25

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

OneToOne relations broken (#527), any workarounds ?


Hard to believe no one knows anything about bug marked as critical with
high priority.. Ok, if i re-phrase it, any ETA available except just
Milestone 1.0 ? Because its not so clear when it happens..

Offline

#3 Nov. 16, 2005 15:42:08

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

OneToOne relations broken (#527), any workarounds ?


On 11/16/05, plisk <> wrote:
> Hard to believe no one knows anything about bug marked as critical with
> high priority.. Ok, if i re-phrase it, any ETA available except just
> Milestone 1.0 ? Because its not so clear when it happens..

Hey plisk,

I'll put this on my to-do list for this week. You're right -- it
should be a high-priority fix.

Adrian

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

Offline

  • Root
  • » Django
  • » OneToOne relations broken (#527), any workarounds ? [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