/usr/lib/python2.7/dist-packages/passlib/ext/django/models.py is in python-passlib 1.7.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 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
#=============================================================================
|