In the new admin app, some of my object types generate a traceback when
I get to the view where I actually alter the values in the fields. I
think one of the fields in that model does not have a proper _repr_
string. How can I isolate the problem? Traceback below...

There's been an error:

Traceback (most recent call last):

  File "/usr/lib/python2.3/site-packages/django/core/handlers/base.py",
line 71, in get_response
    response = callback(request, **param_dict)

  File
"/usr/lib/python2.3/site-packages/django/contrib/admin/views/decorators.py",
line 49, in _checklogin
    return view_func(request, *args, **kwargs)

  File
"/usr/lib/python2.3/site-packages/django/contrib/admin/views/main.py",
line 879, in change_stage
    manipulator = mod.ChangeManipulator(object_id)

  File "/usr/lib/python2.3/site-packages/django/utils/functional.py",
line 3, in _curried
    return args[0](*(args[1:]+moreargs), **dict(kwargs.items() +
morekwargs.items()))

  File "/usr/lib/python2.3/site-packages/django/core/meta/__init__.py",
line 1447, in manipulator_init
    self.fields.extend(f.get_manipulator_fields(opts, self, change))

  File "/usr/lib/python2.3/site-packages/django/core/meta/fields.py",
line 223, in get_manipulator_fields
    params['choices'] = self.get_choices()

  File "/usr/lib/python2.3/site-packages/django/core/meta/fields.py",
line 297, in get_choices
    return first_choice + [(getattr(x, rel_obj.pk.attname), repr(x))
for x in
rel_obj.get_model_module().get_list(**self.rel.limit_choices_to)]

TypeError: __repr__ returned non-string (type NoneType)

Reply via email to