mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
Initial commit
This commit is contained in:
1
venv/Lib/site-packages/passlib/ext/__init__.py
Normal file
1
venv/Lib/site-packages/passlib/ext/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
|
6
venv/Lib/site-packages/passlib/ext/django/__init__.py
Normal file
6
venv/Lib/site-packages/passlib/ext/django/__init__.py
Normal file
@@ -0,0 +1,6 @@
|
||||
"""passlib.ext.django.models -- monkeypatch django hashing framework
|
||||
|
||||
this plugin monkeypatches django's hashing framework
|
||||
so that it uses a passlib context object, allowing handling of arbitrary
|
||||
hashes in Django databases.
|
||||
"""
|
36
venv/Lib/site-packages/passlib/ext/django/models.py
Normal file
36
venv/Lib/site-packages/passlib/ext/django/models.py
Normal file
@@ -0,0 +1,36 @@
|
||||
"""passlib.ext.django.models -- monkeypatch django hashing framework"""
|
||||
#=============================================================================
|
||||
# imports
|
||||
#=============================================================================
|
||||
# core
|
||||
# site
|
||||
# pkg
|
||||
from passlib.context import CryptContext
|
||||
from passlib.ext.django.utils import DjangoContextAdapter
|
||||
# local
|
||||
__all__ = ["password_context"]
|
||||
|
||||
#=============================================================================
|
||||
# global attrs
|
||||
#=============================================================================
|
||||
|
||||
#: adapter instance used to drive most of this
|
||||
adapter = DjangoContextAdapter()
|
||||
|
||||
# the context object which this patches contrib.auth to use for password hashing.
|
||||
# configuration controlled by ``settings.PASSLIB_CONFIG``.
|
||||
password_context = adapter.context
|
||||
|
||||
#: hook callers should use if context is changed
|
||||
context_changed = adapter.reset_hashers
|
||||
|
||||
#=============================================================================
|
||||
# main code
|
||||
#=============================================================================
|
||||
|
||||
# load config & install monkeypatch
|
||||
adapter.load_model()
|
||||
|
||||
#=============================================================================
|
||||
# eof
|
||||
#=============================================================================
|
1276
venv/Lib/site-packages/passlib/ext/django/utils.py
Normal file
1276
venv/Lib/site-packages/passlib/ext/django/utils.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user