diff options
author | komalsheth286 | 2016-12-16 16:38:04 +0530 |
---|---|---|
committer | komalsheth286 | 2016-12-16 16:38:04 +0530 |
commit | 5b2dc4ab914eb6b15327192d75a7defa707ee3ce (patch) | |
tree | 73163e3ba7670e346cbd4a591106cab52e4a725c /certificate | |
parent | a2f9752336c7dc4af76432bd4b717a60258403a3 (diff) | |
download | certificate-generator-5b2dc4ab914eb6b15327192d75a7defa707ee3ce.tar.gz certificate-generator-5b2dc4ab914eb6b15327192d75a7defa707ee3ce.tar.bz2 certificate-generator-5b2dc4ab914eb6b15327192d75a7defa707ee3ce.zip |
SciPy 2016 Certificate
Diffstat (limited to 'certificate')
-rw-r--r--[-rwxr-xr-x] | certificate/scipy_template_2016/template_SPC2016Acertificate | 86 | ||||
-rw-r--r--[-rwxr-xr-x] | certificate/scipy_template_2016/template_SPC2016Pcertificate | 86 | ||||
-rw-r--r--[-rwxr-xr-x] | certificate/scipy_template_2016/template_SPC2016Wcertificate | 86 | ||||
-rw-r--r-- | certificate/templates/scipy_download_2016.html | 6 | ||||
-rw-r--r-- | certificate/templates/scipy_feedback_2016.html | 6 | ||||
-rwxr-xr-x | certificate/views.py | 22 |
6 files changed, 65 insertions, 227 deletions
diff --git a/certificate/scipy_template_2016/template_SPC2016Acertificate b/certificate/scipy_template_2016/template_SPC2016Acertificate index 081df5c..3371830 100755..100644 --- a/certificate/scipy_template_2016/template_SPC2016Acertificate +++ b/certificate/scipy_template_2016/template_SPC2016Acertificate @@ -1,75 +1,21 @@ -%% Certificate template -\documentclass[landscape]{article} -\usepackage{wallpaper} -\usepackage{xcolor} -\usepackage{ulem} -\usepackage{graphicx} -\usepackage{geometry} -\usepackage{chancery} -\usepackage[T1]{fontenc} -%% package to execute bash commands -%% \usepackage{bashful} +* certificate template -%% generate QR code -\usepackage{pst-barcode} -\usepackage{auto-pst-pdf} +** Usage + - To generate a PDF file type, + #+BEGIN_SRC sh + make $command + #+END_SRC sh -\geometry{tmargin=.2cm,bmargin=.2cm, - lmargin=.2cm, rmargin=.2cm} -\usepackage{multicol} -\setlength{\columnseprule}{1pt} -\columnwidth=0.6\textwidth + - To clean the project + #+BEGIN_SRC sh + make clean + #+END_SRC sh -\begin{document} +** License + The tex file and all the images within this project are entirely + PRIVATE. It's usage outside the `Fossee Project` is an legal + offense and will be subject to suitable punishment by Indian law. -%% create MD5 hash of tex file and insert it in PDF -%% \bash -%% md5sum asd_cert.tex | cut -d " " -f 1 -%% \END -%\TileWallPaper{4cm}{2cm}{aakash-logo.png} -\TileWallPaper{28cm}{22cm}{cer_bg.png} - -\centering -\scalebox{3}{\color{brown!30!brown!60} -\begin{minipage}{.33\textwidth} - - -{\centering - -%% logo - top -\vspace{1.5cm} -\textcolor{black}{\textsc{Certificate of Participation}} -\hspace{10cm} -\textcolor{black!100}{\scriptsize This is to certify that}\\ -{\textcolor{blue} {~~~~~~~~{$name}}~~~~~~~~}\\ -{\scriptsize {\color{black} Participated in SciPy India 2016\\ -organized by Indian Institute of Bombay \\ -on 10, 11 December 2016.}\\} - -\vspace{0.3cm} -{\color{black!40!black} -\scalebox{.7}{ - \begin{tabular}{c c c c c} - \small{\includegraphics[height=0.6cm]{kannan-moudgalya-sign.png}} & \small{} & & &\small{\includegraphics[height=0.6cm]{kannan-moudgalya-sign.png}} \\ - \small{Prof. Prabhu Ramachandran} & &\hspace{2.5cm} & & \small{~~~~~~~~Dr. Mr. S. Anand~~~~~~~~} \\ - \vspace{0mm} - {\scriptsize Conference Co-Chair} & & & & \scriptsize {Keynote Speaker} \\ - {\scriptsize FOSSEE, IIT Bombay.} & & & & \scriptsize {CEO Gramener} \\ - - \end{tabular} - -}} -\\ -\vspace{2mm} -%%\includegraphics[height=0.6cm]{fossee-logo.png}\hspace{22pt} -%%\includegraphics[height=0.7cm]{bottom_logo.png}\hspace{22pt} -%%\includegraphics[height=0.7cm]{iitb-logo.png}\hspace{22pt}\\ -\hspace{6.7cm}\begin{pspicture}(0.1cm,0.1cm) \psbarcode{$qr_code}{eclevel=L width=0.25 height=0.25}{qrcode}\end{pspicture}\\ -\hspace{6.7cm}\tiny{\color{black}\texttt{$serial_key}}\\ - -} - -\end{minipage} -} -\end{document} +** Website + [[http://fossee.in]] diff --git a/certificate/scipy_template_2016/template_SPC2016Pcertificate b/certificate/scipy_template_2016/template_SPC2016Pcertificate index 081df5c..3371830 100755..100644 --- a/certificate/scipy_template_2016/template_SPC2016Pcertificate +++ b/certificate/scipy_template_2016/template_SPC2016Pcertificate @@ -1,75 +1,21 @@ -%% Certificate template -\documentclass[landscape]{article} -\usepackage{wallpaper} -\usepackage{xcolor} -\usepackage{ulem} -\usepackage{graphicx} -\usepackage{geometry} -\usepackage{chancery} -\usepackage[T1]{fontenc} -%% package to execute bash commands -%% \usepackage{bashful} +* certificate template -%% generate QR code -\usepackage{pst-barcode} -\usepackage{auto-pst-pdf} +** Usage + - To generate a PDF file type, + #+BEGIN_SRC sh + make $command + #+END_SRC sh -\geometry{tmargin=.2cm,bmargin=.2cm, - lmargin=.2cm, rmargin=.2cm} -\usepackage{multicol} -\setlength{\columnseprule}{1pt} -\columnwidth=0.6\textwidth + - To clean the project + #+BEGIN_SRC sh + make clean + #+END_SRC sh -\begin{document} +** License + The tex file and all the images within this project are entirely + PRIVATE. It's usage outside the `Fossee Project` is an legal + offense and will be subject to suitable punishment by Indian law. -%% create MD5 hash of tex file and insert it in PDF -%% \bash -%% md5sum asd_cert.tex | cut -d " " -f 1 -%% \END -%\TileWallPaper{4cm}{2cm}{aakash-logo.png} -\TileWallPaper{28cm}{22cm}{cer_bg.png} - -\centering -\scalebox{3}{\color{brown!30!brown!60} -\begin{minipage}{.33\textwidth} - - -{\centering - -%% logo - top -\vspace{1.5cm} -\textcolor{black}{\textsc{Certificate of Participation}} -\hspace{10cm} -\textcolor{black!100}{\scriptsize This is to certify that}\\ -{\textcolor{blue} {~~~~~~~~{$name}}~~~~~~~~}\\ -{\scriptsize {\color{black} Participated in SciPy India 2016\\ -organized by Indian Institute of Bombay \\ -on 10, 11 December 2016.}\\} - -\vspace{0.3cm} -{\color{black!40!black} -\scalebox{.7}{ - \begin{tabular}{c c c c c} - \small{\includegraphics[height=0.6cm]{kannan-moudgalya-sign.png}} & \small{} & & &\small{\includegraphics[height=0.6cm]{kannan-moudgalya-sign.png}} \\ - \small{Prof. Prabhu Ramachandran} & &\hspace{2.5cm} & & \small{~~~~~~~~Dr. Mr. S. Anand~~~~~~~~} \\ - \vspace{0mm} - {\scriptsize Conference Co-Chair} & & & & \scriptsize {Keynote Speaker} \\ - {\scriptsize FOSSEE, IIT Bombay.} & & & & \scriptsize {CEO Gramener} \\ - - \end{tabular} - -}} -\\ -\vspace{2mm} -%%\includegraphics[height=0.6cm]{fossee-logo.png}\hspace{22pt} -%%\includegraphics[height=0.7cm]{bottom_logo.png}\hspace{22pt} -%%\includegraphics[height=0.7cm]{iitb-logo.png}\hspace{22pt}\\ -\hspace{6.7cm}\begin{pspicture}(0.1cm,0.1cm) \psbarcode{$qr_code}{eclevel=L width=0.25 height=0.25}{qrcode}\end{pspicture}\\ -\hspace{6.7cm}\tiny{\color{black}\texttt{$serial_key}}\\ - -} - -\end{minipage} -} -\end{document} +** Website + [[http://fossee.in]] diff --git a/certificate/scipy_template_2016/template_SPC2016Wcertificate b/certificate/scipy_template_2016/template_SPC2016Wcertificate index 081df5c..3371830 100755..100644 --- a/certificate/scipy_template_2016/template_SPC2016Wcertificate +++ b/certificate/scipy_template_2016/template_SPC2016Wcertificate @@ -1,75 +1,21 @@ -%% Certificate template -\documentclass[landscape]{article} -\usepackage{wallpaper} -\usepackage{xcolor} -\usepackage{ulem} -\usepackage{graphicx} -\usepackage{geometry} -\usepackage{chancery} -\usepackage[T1]{fontenc} -%% package to execute bash commands -%% \usepackage{bashful} +* certificate template -%% generate QR code -\usepackage{pst-barcode} -\usepackage{auto-pst-pdf} +** Usage + - To generate a PDF file type, + #+BEGIN_SRC sh + make $command + #+END_SRC sh -\geometry{tmargin=.2cm,bmargin=.2cm, - lmargin=.2cm, rmargin=.2cm} -\usepackage{multicol} -\setlength{\columnseprule}{1pt} -\columnwidth=0.6\textwidth + - To clean the project + #+BEGIN_SRC sh + make clean + #+END_SRC sh -\begin{document} +** License + The tex file and all the images within this project are entirely + PRIVATE. It's usage outside the `Fossee Project` is an legal + offense and will be subject to suitable punishment by Indian law. -%% create MD5 hash of tex file and insert it in PDF -%% \bash -%% md5sum asd_cert.tex | cut -d " " -f 1 -%% \END -%\TileWallPaper{4cm}{2cm}{aakash-logo.png} -\TileWallPaper{28cm}{22cm}{cer_bg.png} - -\centering -\scalebox{3}{\color{brown!30!brown!60} -\begin{minipage}{.33\textwidth} - - -{\centering - -%% logo - top -\vspace{1.5cm} -\textcolor{black}{\textsc{Certificate of Participation}} -\hspace{10cm} -\textcolor{black!100}{\scriptsize This is to certify that}\\ -{\textcolor{blue} {~~~~~~~~{$name}}~~~~~~~~}\\ -{\scriptsize {\color{black} Participated in SciPy India 2016\\ -organized by Indian Institute of Bombay \\ -on 10, 11 December 2016.}\\} - -\vspace{0.3cm} -{\color{black!40!black} -\scalebox{.7}{ - \begin{tabular}{c c c c c} - \small{\includegraphics[height=0.6cm]{kannan-moudgalya-sign.png}} & \small{} & & &\small{\includegraphics[height=0.6cm]{kannan-moudgalya-sign.png}} \\ - \small{Prof. Prabhu Ramachandran} & &\hspace{2.5cm} & & \small{~~~~~~~~Dr. Mr. S. Anand~~~~~~~~} \\ - \vspace{0mm} - {\scriptsize Conference Co-Chair} & & & & \scriptsize {Keynote Speaker} \\ - {\scriptsize FOSSEE, IIT Bombay.} & & & & \scriptsize {CEO Gramener} \\ - - \end{tabular} - -}} -\\ -\vspace{2mm} -%%\includegraphics[height=0.6cm]{fossee-logo.png}\hspace{22pt} -%%\includegraphics[height=0.7cm]{bottom_logo.png}\hspace{22pt} -%%\includegraphics[height=0.7cm]{iitb-logo.png}\hspace{22pt}\\ -\hspace{6.7cm}\begin{pspicture}(0.1cm,0.1cm) \psbarcode{$qr_code}{eclevel=L width=0.25 height=0.25}{qrcode}\end{pspicture}\\ -\hspace{6.7cm}\tiny{\color{black}\texttt{$serial_key}}\\ - -} - -\end{minipage} -} -\end{document} +** Website + [[http://fossee.in]] diff --git a/certificate/templates/scipy_download_2016.html b/certificate/templates/scipy_download_2016.html index 21621da..6816ecd 100644 --- a/certificate/templates/scipy_download_2016.html +++ b/certificate/templates/scipy_download_2016.html @@ -51,7 +51,11 @@ <li>Instructions regarding certificates</li> <li>Add the contents</li> </ol></div> - </div> + + <div class="modal-footer"> + <button type="button" class="btn btn-default" data-dismiss="modal">Ok</button> + </div> + </div> </div> </form> diff --git a/certificate/templates/scipy_feedback_2016.html b/certificate/templates/scipy_feedback_2016.html index 0b76a4d..5293418 100644 --- a/certificate/templates/scipy_feedback_2016.html +++ b/certificate/templates/scipy_feedback_2016.html @@ -7,9 +7,9 @@ {% block content %} <p> Your feedback will help us improve our services. Thank you for your time. </p> <div> - <!-- <div class="embed-responsive embed-responsive-16by9" style="width:100%;height:2000px"> - <iframe class="embed-responsive-item" src="https://docs.google.com/forms/d/1OAtVUGG5MmoJyX81ODxorIOhnJeJ0Qu36PBGBQyYWNA/viewform"></iframe> - </div> --> + <div class="embed-responsive embed-responsive-16by9" style="width:100%;height:2000px"> + <iframe class="embed-responsive-item" src="https://docs.google.com/forms/d/e/1FAIpQLSc58NmRJFBtfdrkbDXCTcIX8IszHhqeOO5vPlmyLgxGJLJ8Yw/viewform"></iframe> + </div> <br> <a class="btn" style="float:right" href = "{% url 'certificate:scipy_download_2016' %}">Click here to download certificate</a> </div> diff --git a/certificate/views.py b/certificate/views.py index 5d07603..e797c7d 100755 --- a/certificate/views.py +++ b/certificate/views.py @@ -10,6 +10,8 @@ import hashlib from certificate.forms import FeedBackForm from collections import OrderedDict from django.core.mail import EmailMultiAlternatives +from django.views.decorators.csrf import csrf_exempt + # Create your views here. @@ -1713,7 +1715,7 @@ def create_scipy_certificate_2015(certificate_path, name, qrcode, type, paper, w error = True return [None, error] - +@csrf_exempt def scipy_feedback_2016(request): context = {} ci = RequestContext(request) @@ -1750,7 +1752,7 @@ def scipy_feedback_2016(request): return render_to_response('scipy_feedback_2016.html', context, ci) - +@csrf_exempt def scipy_download_2016(request): context = {} err = "" @@ -1902,7 +1904,7 @@ def scipy_download_2016(request): # context['message'] = '' # return render_to_response('scipy_download_2016.html', context, ci) - +@csrf_exempt def create_scipy_certificate_2016(certificate_path, name, qrcode, type, paper, workshop, file_name): error = False try: @@ -1957,10 +1959,10 @@ def create_scipy_certificate_2016(certificate_path, name, qrcode, type, paper, w subject = "SciPy India 2016 - Certificate" to = ['scipy@fossee.in', name['email'],] - message = """ Hello, - Sending plain mail for testing + message = """ Dear Participant,<br>Please find attached the participation certificate for SciPy India 2016.<br>If you wish to print this certificate, for optimal printing, please follow these instructions:<br><br>Recommended Paper: Ivory (Matt or Glossy) White <br>Recommended GSM: Minimum of 170<br>Size: Letter size (8.5 x 11 in)<br>Print Settings: Fit to page<br><br>Regards,<br>SciPy India Team """ + email = EmailMultiAlternatives( subject,'', sender_email, to, @@ -1970,20 +1972,14 @@ def create_scipy_certificate_2016(certificate_path, name, qrcode, type, paper, w email.attach_file(path) email.send(fail_silently=True) - # subject = 'subject' - # from_email = 'from_email@gmail.com' - # to = ['inbox.komal@gmail.com',] - # message = path - # msg = EmailMultiAlternatives(subject, message, from_email, [to]) - # msg.attach_file(path) - # msg.content_subtype = "html" - # msg.send() except Exception as e: print "===============================", e _clean_certificate_certificate(certificate_path, file_name) return [None, False] else: error = True + + except Exception, e: error = True return [None, error] |