summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-08-26 13:17:02 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-08-26 13:17:02 -0400
commit09a106fe2184118d557fb3f8a251d3b00f3e7fe7 (patch)
tree00cb03cd7cd88971e476eefa56c9804418cc2897
parent4de17e657f73a584092fda9811dd16172be49533 (diff)
downloadaskbot-09a106fe2184118d557fb3f8a251d3b00f3e7fe7.tar.gz
askbot-09a106fe2184118d557fb3f8a251d3b00f3e7fe7.tar.bz2
askbot-09a106fe2184118d557fb3f8a251d3b00f3e7fe7.zip
removed debugging print statements
-rw-r--r--askbot/__init__.py4
-rw-r--r--askbot/deps/django_authopenid/views.py16
-rw-r--r--askbot/tests/email_alert_tests.py1
-rw-r--r--askbot/tests/page_load_tests.py2
4 files changed, 2 insertions, 21 deletions
diff --git a/askbot/__init__.py b/askbot/__init__.py
index 184ddbf9..ce0341d7 100644
--- a/askbot/__init__.py
+++ b/askbot/__init__.py
@@ -43,8 +43,8 @@ def send_mail(
if raise_on_failure is True, exceptions.EmailNotSent is raised
"""
- print subject_line
- print body_text
+ #print subject_line
+ #print body_text
try:
msg = mail.EmailMessage(
subject_line,
diff --git a/askbot/deps/django_authopenid/views.py b/askbot/deps/django_authopenid/views.py
index 9ffd048a..2666d6c5 100644
--- a/askbot/deps/django_authopenid/views.py
+++ b/askbot/deps/django_authopenid/views.py
@@ -154,7 +154,6 @@ def ask_openid(
auth_request.addExtension(sreg_request)
redirect_url = auth_request.redirectURL(trust_root, redirect_to)
logging.debug('redirecting to %s' % redirect_url)
- print 'redirecting to %s' % redirect_url
return HttpResponseRedirect(redirect_url)
def complete(request, on_success=None, on_failure=None, return_to=None):
@@ -232,13 +231,9 @@ def signin(
openid_login_form = forms.OpenidSigninForm(initial = initial_data)
password_login_form = forms.ClassicLoginForm(initial = initial_data)
- print request.method
-
if request.method == 'POST':
- print 'have post'
#'blogin' - password login
if 'blogin' in request.POST:
- print 'blogin'
logging.debug('processing classic login form submission')
password_login_form = forms.ClassicLoginForm(request.POST)
if password_login_form.is_valid():
@@ -336,11 +331,9 @@ def signin(
raise Http404
elif 'bsignin' in request.POST or 'openid_username' in request.POST:
- print request.POST
logging.debug('processing signin with openid submission')
openid_login_form = forms.OpenidSigninForm(request.POST)
if openid_login_form.is_valid():
- print 'openid form is valid'
logging.debug('OpenidSigninForm is valid')
next = openid_login_form.cleaned_data['next']
sreg_req = sreg.SRegRequest(optional=['nickname', 'email'])
@@ -355,7 +348,6 @@ def signin(
on_failure=signin_failure,
sreg_request=sreg_req)
else:
- print 'openid form is not valid'
logging.debug('OpenidSigninForm is NOT valid! -> redisplay login view')
if request.method == 'GET' and request.user.is_authenticated():
@@ -464,9 +456,7 @@ def signin_success(request, identity_url, openid_response):
logging.debug('trying to get user associated with this openid...')
rel = UserAssociation.objects.get(openid_url__exact = str(openid_))
logging.debug('success')
- print 'found openid in database'
if request.user.is_authenticated() and rel.user != request.user:
- print 'thief'
logging.critical(
'possible account theft attempt by %s,%d to %s %d' % \
(
@@ -478,29 +468,23 @@ def signin_success(request, identity_url, openid_response):
)
raise Http404
else:
- print 'good'
logging.debug('success')
except UserAssociation.DoesNotExist:
if request.user.is_anonymous():
- print 'need to register'
logging.debug('failed --> try to register brand new user')
# try to register this new user
return register(request)
else:
#store openid association
- print 'was logged in, but no stored openid yet'
try:
user_assoc = UserAssociation.objects.get(user = request.user)
user_assoc.openid_url = str(openid_)
- print 'found matching user with other openid'
except UserAssociation.DoesNotExist:
- print 'creatin new openid method'
user_assoc = UserAssociation(
user = request.user,
openid_url = openid_
)
user_assoc.save()
- print 'saved association'
message = _('New login method saved. Thanks!')
request.user.message_set.create(message = message)
#set "account recovered" message
diff --git a/askbot/tests/email_alert_tests.py b/askbot/tests/email_alert_tests.py
index f0508f03..3ce4fc6b 100644
--- a/askbot/tests/email_alert_tests.py
+++ b/askbot/tests/email_alert_tests.py
@@ -663,7 +663,6 @@ class DelayedAlertSubjectLineTests(TestCase):
}
from askbot.management.commands import send_email_alerts as cmd
subject = cmd.get_update_subject_line(q_dict)
- print subject
self.assertTrue('one' not in subject)
self.assertTrue('two' in subject)
diff --git a/askbot/tests/page_load_tests.py b/askbot/tests/page_load_tests.py
index 7a999a22..0938be18 100644
--- a/askbot/tests/page_load_tests.py
+++ b/askbot/tests/page_load_tests.py
@@ -32,7 +32,6 @@ class PageLoadTests(PageLoadTestCase):
def test_index(self):
#todo: merge this with all reader url tests
- print 'trying to reverse index'
response = self.client.get(reverse('index'), follow=True)
self.assertEqual(response.status_code, 200)
self.failUnless(len(response.redirect_chain) == 1)
@@ -40,7 +39,6 @@ class PageLoadTests(PageLoadTestCase):
c = response.context[0]
t = response.template[0]
self.assertEqual(t.name, 'questions.html')
- print 'index works'
def proto_test_non_user_urls(self):
"""test all reader views thoroughly