Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

make model __unicode__ method return to multiple columns

Tags:

python

django

How can I make Django model __unicode__ method return multiple values to multiple columns?

like image 874
Capuchin Avatar asked Mar 18 '23 14:03

Capuchin


1 Answers

just add to following to the Class:

def __unicode__(self):
    return '%s %s' % (self.value1, self.value2)    
like image 195
m4rinos Avatar answered Apr 02 '23 02:04

m4rinos