From b728bb54037a36895fb600bb2e2c89a1ba736c0d Mon Sep 17 00:00:00 2001 From: Jayaram R Pai Date: Tue, 8 Jul 2014 10:37:07 +0530 Subject: added default value for email --- comments/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'comments') diff --git a/comments/views.py b/comments/views.py index 15a174b..260678a 100644 --- a/comments/views.py +++ b/comments/views.py @@ -36,7 +36,7 @@ def new_comment(request): comment.page = form.cleaned_data.get("page") comment.title = form.cleaned_data.get("title") comment.body = form.cleaned_data.get("body") - comment.email = form.cleaned_data.get("email") + comment.email = form.cleaned_data.get("email", "Anonymous") comment.save() return HttpResponseRedirect( '/comments/get/?book={0}&chapter={1}&example={2}&page={3}'.format( @@ -85,7 +85,7 @@ def new_reply(request): reply = Reply() reply.comment = comment reply.body = form.cleaned_data.get('body') - reply.email = form.cleaned_data.get('email') + reply.email = form.cleaned_data.get('email', 'Anonymous') reply.save() return HttpResponseRedirect( '/comments/get/?book={0}&chapter={1}&example={2}&page={3}'.format( -- cgit