Commits

Steve Losh committed fac2870

Make the default setting retrieval more elegant.

Comments (0)

Files changed (1)

django_bcrypt/models.py

 from django.conf import settings
 
 
-try:
-    rounds = settings.BCRYPT_ROUNDS
-except AttributeError:
-    rounds = 12
-
+rounds = getattr(settings, "BCRYPT_ROUNDS", 12)
 _check_password = User.check_password
 
 def bcrypt_check_password(self, raw_password):