Yes (and sorry for getting your name wrong before, Brett).
str(self.document) works.

On Jan 4, 6:26 pm, Brett Epps <brett.e...@quest.com> wrote:
> Oh, I think the problem is in the __unicode__() method of your Quiz8
> model.  You're returning self.document, which is a Document8 object and
> not a unicode string.  Try returning unicode(self.document) or something
> like '%d' % document.id.
>
> Brett
>
> On 1/4/12 5:07 PM, "Andy Oram" <an...@oreilly.com> wrote:
>
>
>
>
>
>
>
> >Thanks, Bill. I apologize for not including DEBUG output. Here is what
> >seems relevant. It looks like the ForeignKey relationship filled in
> >fields
> >with the id's of the document and document version (which is what
> >one would expect) and  there was a problem converting it to a string.
>
> >----
>
> >Request Method:     POST
> >Request URL:        http://localhost:8000/admin/quiz9s/quiz9/add/
> >Django Version:     1.3.1
> >Exception Type:     TypeError
> >Exception Value:
>
> >coercing to Unicode: need string or buffer, int found
>
> >Exception Location:         /usr/local/lib/python2.6/dist-packages/django/
> >utils/encoding.py in force_unicode, line 71
> >Python Executable:  /usr/bin/python
> >Python Version:     2.6.5
>
> >-------
>
> >csrfmiddlewaretoken: u'267144fccb830df5fa96feeb691b7ae8'
>
> >document: u'1'
>
> >quiz_owner: u'1'
>
> >_save: u'Save'
>
> >--
> >You received this message because you are subscribed to the Google Groups
> >"Django users" group.
> >To post to this group, send email to django-users@googlegroups.com.
> >To unsubscribe from this group, send email to
> >django-users+unsubscr...@googlegroups.com.
> >For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to