From 0c548516bc951cbbd3f153a8e5c7b6a2108962c0 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sun, 8 Jan 2006 05:10:51 +0000 Subject: [PATCH] Fixed #1185 -- Fixed Python 2.4 bug in Django authentication mod_python handler. Thanks, Brian Ray git-svn-id: http://code.djangoproject.com/svn/django/trunk@1853 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- AUTHORS | 1 + django/contrib/auth/handlers/modpython.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 73fe3078c9..10b41c2e7c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -81,6 +81,7 @@ answer newbie questions, and generally made Django that much better: phaedo Luke Plant plisk + Brian Ray Oliver Rutherfurd David Schein sopel diff --git a/django/contrib/auth/handlers/modpython.py b/django/contrib/auth/handlers/modpython.py index a29051b4a3..d538c9ccc8 100644 --- a/django/contrib/auth/handlers/modpython.py +++ b/django/contrib/auth/handlers/modpython.py @@ -13,7 +13,7 @@ def authenhandler(req, **kwargs): from django.models.auth import users # check for PythonOptions - _str_to_bool = lambda s: s.lower() in '1', 'true', 'on', 'yes' + _str_to_bool = lambda s: s.lower() in ('1', 'true', 'on', 'yes') options = req.get_options() permission_name = options.get('DjangoPermissionName', None)