From e56e08c56ea0a4a8ac45aff7bfcd39d351e04e53 Mon Sep 17 00:00:00 2001 From: Eli Collins Date: Tue, 17 Apr 2012 15:34:14 -0400 Subject: CryptPolicy deprecated, part2 - updated rest of library to use CryptContext directly --- passlib/ext/django/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'passlib/ext/django') diff --git a/passlib/ext/django/models.py b/passlib/ext/django/models.py index d76cc9c..0bf9b99 100644 --- a/passlib/ext/django/models.py +++ b/passlib/ext/django/models.py @@ -13,7 +13,7 @@ see the Passlib documentation for details on how to use this app #site from django.conf import settings #pkg -from passlib.context import CryptContext, CryptPolicy +from passlib.context import CryptContext from passlib.utils import is_crypt_context from passlib.utils.compat import bytes, unicode, base_string_types from passlib.ext.django.utils import DEFAULT_CTX, get_category, \ @@ -35,7 +35,7 @@ def patch(): if ctx == "passlib-default": ctx = DEFAULT_CTX if isinstance(ctx, base_string_types): - ctx = CryptContext(policy=CryptPolicy.from_string(ctx)) + ctx = CryptContext.from_string(ctx) if not is_crypt_context(ctx): raise TypeError("django settings.PASSLIB_CONTEXT must be CryptContext " "instance or configuration string: %r" % (ctx,)) -- cgit v1.2.1