id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux
864,OneToOne in Admin -- unexpected keyword argument 'bar__pk',EABinGA,Adrian Holovaty,"Using new-admin rev-1326:
Given the Model Foo:
{{{
from django.core import meta
# Create your models here.
class Bar(meta.Model):
class META:
admin = meta.Admin()
bardata = meta.CharField(maxlength=200)
def __repr__(self):
return self.bardata
class Baz(meta.Model):
class META:
admin = meta.Admin()
bazdata = meta.CharField(maxlength=200)
bar = meta.OneToOneField(Bar)
def __repr__(self):
return self.bazdata
}}}
When you try to add a baz to a bar and click ¨save¨
You are greeted by the following:
{{{
TypeError at /admin/foo/bazs/1/
got unexpected keyword argument 'bar__pk'
Request Method: POST
Request URL: http://127.0.0.1:8080/admin/foo/bazs/1/
Exception Type: TypeError
Exception Value: got unexpected keyword argument 'bar__pk'
Exception Location: /usr/lib/python2.4/site-packages/Django-0.90-py2.4.egg/django/core/meta/__init__.py in _throw_bad_kwarg_error, line 1379
}}}
Aditionally: the list of bazs (http://127.0.0.1:8000/admin/foo/bazs/) has entries that disappear after
selecting a baz, they return if you restart the app. (Adrian though he may have fixed this, but it seems not to be the case)
Also: The user interface for entering a baz seems to be buggy. It shows a label of ¨ID¨ folowed by a dropdown list containing only the bar I would like to add a baz to, followed by what seems to be the PK of said bar.
",defect,closed,contrib.admin,,normal,fixed,,,Unreviewed,0,0,0,0,,