summaryrefslogtreecommitdiff
path: root/tbc
diff options
context:
space:
mode:
authorhardythe12015-08-04 15:11:54 +0530
committerhardythe12015-08-04 15:11:54 +0530
commite5c6c1b4c4d243eac483a808fbc33ad34c836c68 (patch)
tree216dbf0408769508de1d435000081b3a5e56ede9 /tbc
parent94d68a3a70f5c8db716e10857c850095a2d4c3bd (diff)
downloadPython-TBC-Interface-e5c6c1b4c4d243eac483a808fbc33ad34c836c68.tar.gz
Python-TBC-Interface-e5c6c1b4c4d243eac483a808fbc33ad34c836c68.tar.bz2
Python-TBC-Interface-e5c6c1b4c4d243eac483a808fbc33ad34c836c68.zip
fix minor path error & change book complete mail
Diffstat (limited to 'tbc')
-rwxr-xr-xtbc/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tbc/views.py b/tbc/views.py
index 1bd2cf5..7793921 100755
--- a/tbc/views.py
+++ b/tbc/views.py
@@ -1075,6 +1075,7 @@ def ApproveBook(request, book_id=None):
book = Book.objects.get(id=book_id)
file_path = local.path
book_title = book.title.replace(" ", "_")
+ book_title = book.title +'_by_'+book.author.replace(" ", "_")
directory = file_path+book_title
os.chdir(directory)
fp = open(directory+"/README.txt", 'w')
@@ -1105,7 +1106,7 @@ def ApproveBook(request, book_id=None):
book.save()
subject = "Python-TBC: Book Completion"
message = """Hi """+book.contributor.user.first_name+""",\n
-Congratulations !\nThe book - """+book.title+""" is now complete & published.\nPlease visit the link given below to download the forms to be filled to complete the formalities.\nhttp://tbc-python.fossee.in/internship-forms\nThe forms should be duly filled (fill only the sections which are applicable) & submitted at the following address:\nDr. Prabhu Ramachandran,\nDepartment of Aerospace Engineering,\nIIT Bombay, Powai, Mumbai - 400076\nKindly write Python Textbook Companion on top of the envelope.\nIf you already sent the forms then you may kindly ignore this mail.\n\nThank You for your contribution !\nRegards,\n Python TBC Team,\nFOSSEE - IIT Bombay"""
+Congratulations !\nThe book - """+book.title+""" is now complete & published.\nPlease visit the link given below to download the forms to be filled to complete the formalities.\nhttp://tbc-python.fossee.in/internship-forms\nThe forms should be duly filled (fill only the sections which are applicable) & submitted at the following address:\nDr. Prabhu Ramachandran,\nDepartment of Aerospace Engineering,\nIIT Bombay, Powai, Mumbai - 400076\nKindly write Python Textbook Companion on top of the envelope.\nIf you have already sent the forms then you may kindly ignore this mail.\n\nPlease note that honorarium will be processed within 15 days from the day we receive your forms. We kindly request you to be patient.\n\nCertificate for completed books can be downloaded from the TBC interface itself under the 'Get Certificate' tab which will be available once you login.\n\nThank You for your contribution !\nRegards,\n Python TBC Team,\nFOSSEE - IIT Bombay"""
add_log(user, book, CHANGE, msg, proposal.id,
chat=subject + '\n' + message)
email_send(book.contributor.user.email, subject, message)