Easy to do:
Just override the save() function of the model.
class MyModel(models.Model):
def save(self, **kwargs):
#add your logic here
super(MyModel, self).save(**kwargs)
--
You received this message because you are subscribed to the Google Groups
I am trying to figure out the best way to go about this. Here is the
scenario:
I have five fields in my model that the user will set from the admin.
When they save the model I want to insert a value into another field
of the model based on these values.
Where/How is the best place to handle
2 matches
Mail list logo