I have the following code:
class Actor(models.Model):
first_name = models.CharField('First Name', max_length=135)
last_name = models.CharField('Last Name', max_length=135)
class Meta:
db_table = u'actor'
def actorname(self):
return u'%s %s' %(self.first_name, self.last_name)
def __unicode__(self):
return str(self.actorname)
I don't see what's wrong with my code, but in the django admin it is showing as Actor Object
.
What am i doing wrong?
Thanks.