summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprathamesh2015-06-24 13:20:13 +0530
committerprathamesh2015-06-24 13:20:13 +0530
commitaa3dd8e0505fc39c4bd47608e2345b429fe1a045 (patch)
tree931e2cbe7ea6c70919b460eff268d07f25045cdd
parent064f18d507bc225ef0941344a66f99b489a05f8c (diff)
downloadPython-TBC-Interface-aa3dd8e0505fc39c4bd47608e2345b429fe1a045.tar.gz
Python-TBC-Interface-aa3dd8e0505fc39c4bd47608e2345b429fe1a045.tar.bz2
Python-TBC-Interface-aa3dd8e0505fc39c4bd47608e2345b429fe1a045.zip
Replacing '&' in book title with 'and' in the certificate
-rwxr-xr-xtbc/views.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tbc/views.py b/tbc/views.py
index 5968973..9d6d4a3 100755
--- a/tbc/views.py
+++ b/tbc/views.py
@@ -1270,8 +1270,8 @@ def GetCertificate(request, book_id=None):
else:
pronoun = 'He'
full_name = '%s %s' %(user.first_name, user.last_name)
- user_details = 'from %s' % (institute)
- book_details = '%s, %s edition' % (title, edition)
+ user_details = 'from %s' % (institute.replace('&', 'and'))
+ book_details = '%s, %s edition' % (title.replace('&', 'and'), edition)
try:
template_file = open('{0}template_certificate'.format\
(certificate_path), 'r')