summaryrefslogtreecommitdiff
path: root/passlib/ext/django/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'passlib/ext/django/models.py')
-rw-r--r--passlib/ext/django/models.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/passlib/ext/django/models.py b/passlib/ext/django/models.py
index 55bb4c6..e3938aa 100644
--- a/passlib/ext/django/models.py
+++ b/passlib/ext/django/models.py
@@ -1,7 +1,7 @@
"""passlib.ext.django.models -- monkeypatch django hashing framework"""
-#===================================================================
-#imports
-#===================================================================
+#=============================================================================
+# imports
+#=============================================================================
# core
import logging; log = logging.getLogger(__name__)
from warnings import warn
@@ -17,9 +17,9 @@ from passlib.utils.compat import callable, unicode, bytes
# local
__all__ = ["password_context"]
-#===================================================================
+#=============================================================================
# global attrs
-#===================================================================
+#=============================================================================
# the context object which this patches contrib.auth to use for password hashing.
# configuration controlled by ``settings.PASSLIB_CONFIG``.
@@ -42,9 +42,9 @@ _manager = _PatchManager(log=logging.getLogger(__name__ + "._manager"))
# patch status
_patched = False
-#===================================================================
+#=============================================================================
# applying & removing the patches
-#===================================================================
+#=============================================================================
def _apply_patch():
"""monkeypatch django's password handling to use ``passlib_context``,
assumes the caller will configure the object.
@@ -216,9 +216,9 @@ def _remove_patch():
log.debug("django not monkeypatched")
return False
-#===================================================================
+#=============================================================================
# main code
-#===================================================================
+#=============================================================================
def _load():
global _get_category
@@ -276,6 +276,6 @@ except:
_remove_patch()
raise
-#===================================================================
-#eof
-#===================================================================
+#=============================================================================
+# eof
+#=============================================================================