Esempio n. 1
0
 def get(self):
     path = os.path.join(os.path.dirname(__file__), '..', 
                                                    'views', 
                                                    'index.html')
     template_vars = {'short_status': config.get('200', 'short'),
                      'long_status': config.get('200', 'long')}
     self.response.out.write(template.render(path, template_vars))
     visit = Visit(self.request)
     visit.put()
     jabber(self.request, config.get('action', 'visiting'))
Esempio n. 2
0
 def get(self):
     cv = Cv.all().order('-created_at').get()
     
     self.response.headers['ETag'] = cv.e_tag
     self.response.headers['Last-Modified'] = cv.rfc2822_date
     self.response.headers['Content-MD5'] = cv.md5_sum
     self.response.headers['Content-Type'] = config.get('content', 'type')
     self.response.headers['Content-Disposition'] = '%s;filename=%s' % (
                                       config.get('content', 'disposition'),
                                       config.get('content', 'filename'))
     self.response.out.write(cv.pdf)
     visit = Visit(self.request)
     visit.put()
     jabber(self.request, config.get('action', 'download_cv'))