Hello,

I am using Django version 1.2.4 on Ubuntu 10.04. When I try to click
on an individual database table record in the Django Administration
interface (for editing, for example), I get the following error:


TemplateSyntaxError at /admin/iom_catalog/sample/610/
Caught TypeError while rendering: coercing to Unicode: need string or
buffer, int found

The error is located on line 19 of the fieldset.html administration
template:

17      <p>{{ field.contents }}</p>
18      {% else %}
19      {{ field.field }}
20      {% endif %}
21      {% endif %}

The table I am querying is set to return a fieldname that is defined
as varchar... ex.

class Sample(models.Model):
    sample_name = models.CharField(max_length=100)
    location = models.CharField(max_length=100,blank=True,null=True)
    country = models.CharField(max_length=50,blank=True,null=True)
    ........"other fieldnames defined".........
    def __unicode__(self):
         #return unicode(self.sample_name)
         return self.sample_name

Could it be that the error refers to one of the fields rendered in the
individual record edit page instead. If so, how do I find out which
one?

Thanks, Bill

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