From f8e24521b070528a76a1540ee64aa76d8fea8604 Mon Sep 17 00:00:00 2001 From: ichuang Date: Tue, 29 May 2012 07:33:50 -0400 Subject: [PATCH] in sslauth, auto-create user when settings.DEBUG=true --- djangoapps/ssl_auth/ssl_auth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/djangoapps/ssl_auth/ssl_auth.py b/djangoapps/ssl_auth/ssl_auth.py index 8c96d4b9a6..df3029da93 100755 --- a/djangoapps/ssl_auth/ssl_auth.py +++ b/djangoapps/ssl_auth/ssl_auth.py @@ -173,7 +173,8 @@ class SSLLoginBackend(ModelBackend): try: user = User.objects.get(username=username) # if user already exists don't create it except User.DoesNotExist: - raise "User does not exist. Not creating user; potential schema consistency issues" + if not settings.DEBUG: + raise "User does not exist. Not creating user; potential schema consistency issues" #raise ImproperlyConfigured("[SSLLoginBackend] creating %s" % repr(info)) user = User(username=username, password=GenPasswd()) # create new User user.is_staff = False