diff options
author | Jayaram R Pai | 2014-07-08 10:37:07 +0530 |
---|---|---|
committer | Jayaram R Pai | 2014-07-08 10:37:07 +0530 |
commit | b728bb54037a36895fb600bb2e2c89a1ba736c0d (patch) | |
tree | 074c6a31359cfe43e6e0fcb6c2ea842969089b07 /comments | |
parent | fd765dab5eab149535ec01540562e8100f582307 (diff) | |
download | Python-TBC-Interface-b728bb54037a36895fb600bb2e2c89a1ba736c0d.tar.gz Python-TBC-Interface-b728bb54037a36895fb600bb2e2c89a1ba736c0d.tar.bz2 Python-TBC-Interface-b728bb54037a36895fb600bb2e2c89a1ba736c0d.zip |
added default value for email
Diffstat (limited to 'comments')
-rw-r--r-- | comments/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
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( |