Hi Jean Baptiste.
Did you find a solution to your issue? I am in the same situation and your
explanation is the closest that I have found.
Thanks...
El viernes, 2 de diciembre de 2016, 15:33:22 (UTC+1), Jean-Baptiste Pressac
escribió:
>
> Hello,
> Thanks Carlos but modifying TypeOeuvre as sugg
Hello,
Thanks Carlos but modifying TypeOeuvre as suggested
def __unicode__(self):
return self.intitule.__str__
generates the following error :
Exception Type: TypeError at /admin/prelib/typeoeuvre/11/delete/Exception
Value: __str__ returned non-string (type method-wrapper)
2016-12-02
def __unicode__(self):
return "{0} [{1}]".format(self.titre[:200], self.id).__str__
def __unicode__(self):
return self.intitule.__str__
2016-12-02 10:03 GMT-03:00 Jean-Baptiste Pressac :
> Hello,
> On Django 1.8 + Python 2.7.11, I have declared in Django admin.py an
> oeuvre cl
Hello,
On Django 1.8 + Python 2.7.11, I have declared in Django admin.py an oeuvre
class with a ManyToManyField (types) to an TypeOeuvre class.
class Oeuvre(models.Model):
titre = models.CharField(max_length=510)
types = models.ManyToManyField('TypeOeuvre',
4 matches
Mail list logo