1👍
You can set the default value for a field to a callable object.
Or, you might try using a post_save handler instead, where you can check if created
is True
. Also, it might be helpful to check the value in verification_pin after saving, to see if it really got set or not.
Source:stackexchange.com