9
Let's say I have a class named Hero with a field named "name". Everytime a new Hero object is created, I want to append " is a hero". Can I use __init__ for that? Or is there a django-specific method I can override for that?
class Hero(modes.Model)
name = models.CharField(max_length=100)
def __init__(self, *args, **kwargs):
name += " is a hero"
super(Hero, self).__init__(*args, **kwargs)