I have a model where ShortUUIDField automatically generating ids I want to disable the auto generation
class Mymodel(models.Model):
pid=ShortUUIDField(length=10,max_length=100,prefix="prd",alphabet="abcdef")
sample_id = ShortUUIDField(length=10, max_length=100, prefix="var", alphabet="abcdef", null=True, blank=True,default=lambda: None)
I added default=lambda: None
in sample_id
field but it is still automatically generating the ids. I want the id default to be blank
You need to sign in to view this answers
Leave feedback about this