i need to update the columnvalue of a particular field everytime i create a new entry to the table with some hash value. i created the model as follows:
class ICOExchange(models.Model):
id = models.CharField(default=create_UUID('user '),
max_length=100, primary_key=True)
def set_id(self):
self.id = create_UUID('user ')
where create_UUID(arg)
is a function that generates a hash value according to some inputs and timestamp.
But while adding datasets through the admin panel it doesnt refresh the id and id remains the same.