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()

Reply via email to