Re: insert into data field of model based on other data field values

2009-12-07 Thread Shawn Milochik
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

insert into data field of model based on other data field values

2009-12-07 Thread rc
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