so I have a model and I am using a UUID field. I just simply want to change the UUID(refresh the UUID) to a new UUID every time a model object is saved.
import uuid
from django.db import models
class MyUUIDModel(models.Model):
id = models.UUIDField(default=uuid.uuid4, unique=True)
# other fields
def save(self, *args, **kwargs):
//refresh the uuid. what do i do here?
super(MyUUIDModel, self).save(*args, **kwargs)