[Answer]-Filter() keywords must be strings

1👍

The full traceback would have been useful.

I expect the problem comes from the related_name attribute in your people field. You’ve marked this for translation, but that makes no sense: this is an attribute you use in your code, not something for public consumption. Take out the _() call.

0👍

photo is object, but you want get this as str:

return u'<img src="%s" /> - %s - %s' % (self.photo, self.description, self.people )

You need url attr:

return u'<img src="%s" /> - %s - %s' % (self.photo.url, self.description, self.people )

My solution about people:

people = models.ManyToManyField(PersonModel, related_name = _('Persons'), verbose_name=_('Person'))

Leave a comment