I was watching a tutorial on django and the guy added the following line of code, however he didnt exactly explain what it does.
return '%s - %s' django
the full code line is:
def __str__(self):
return '%s - %s' % (self.post, self.author)
and i do understand it, just not that return part. Anyone mind clearing it out for me.
.__str__()method.