Exemplo n.º 1
0
 def get(self):
   user = users.get_current_user()
   logout_url = users.create_logout_url(self.request.uri)
   login_url = users.create_login_url(self.request.uri)
   if user:
     resume_orgs = ResumeOrganizations.query().fetch()
     self.render_normal_json(resume_orgs)
   else:
     self.redirect(login_url)
Exemplo n.º 2
0
 def get(self,urlString):
   user = users.get_current_user()
   logout_url = users.create_logout_url(self.request.uri)
   login_url = users.create_login_url(self.request.uri)
   if user:
     resume_key = ndb.Key(urlsafe=urlString)
     resume = resume_key.get()
     resumeorgs = ResumeOrganizations.query(ancestor = resume_key).fetch()
     values = {
       'resumeorgs' : resumeorgs,
       'resume' : resume,
       'logout_url' : logout_url,
       'user' : user,
     }
     self.render_html('resume-detail.html',values)
   else:
     self.redirect(login_url)