This won't work if min_length is changed; I suggest using 't'*settings.PASSWORD_RESTRICTIONS["min_length"].  I also suggest setting the password as a variable somewhere :)