I have a class in Django model.py
class Ticket(models.Model):
game = models.ForeignKey(Game)
def __unicode__(self):
return self.numbers
def checksum(self):
#calculate checksum here
and in other function, I can call something like: ticket.checksum
But later, I add another method (get_scan)
class Ticket(models.Model):
game = models.ForeignKey(Game)
def __unicode__(self):
return self.numbers
def checksum(self):
#calculate checksum here
def get_scan(self):
#calculate get_scan here
but now I can not call ticket.get_scan (eventhough ticket.checksum still works)
I have tried different way like restart web server, calling in Django shell ... but it does not work.
Error:
'Ticket' object has no attribute 'get_scan'
Updated: it's about indentation problem