[Fixed]-Generate a unique key after refresh Django Admin form

1👍

Pass a callable object, not the result of the function:

db_password = models.CharField(max_length=255, default=generate_rand)

Django documentation for default

Leave a comment