class Person models Model name models CharField max_length 50 phoneno

1
2
3
4
5
6
7
8
9
class Person(models.Model):
name = models.CharField(max_length=50)
phoneno = models.CharField(max_length=14)
def get_absolute_url(self):
return '/person/%s/' % self.id
def save(self):
super(Comment, self).save()