def get(self): user = users.get_current_user() if user: wiki = Wiki.getByUser(user) self.redirect(wiki.getUrl()) else: self.redirect('/')
def get(self): wiki = None user = users.get_current_user() if user: wiki = Wiki.getByUser(user) self.response.out.write(template.render('templates/index.html', { 'user': user, 'logout_url': users.create_logout_url(self.request.path), 'login_url': users.create_login_url('/_onlogin'), 'wiki': wiki }))
def get(self): if self.request.host.find("appspot") != -1 and self.request.url.find("https") != 0: # if on appspot.com and not in ssl mode self.redirect("http://www.zen-wiki.com" + self.request.path) wiki = None user = users.get_current_user() if user: wiki = Wiki.getByUser(user) self.response.out.write(template.render('templates/index.html', { 'user': user, 'logout_url': users.create_logout_url(self.request.path), 'login_url': users.create_login_url('/_onlogin'), 'wiki': wiki }))
def get(self): if self.request.host.find("appspot") != -1 and self.request.url.find( "https") != 0: # if on appspot.com and not in ssl mode self.redirect("http://www.zen-wiki.com" + self.request.path) wiki = None user = users.get_current_user() if user: wiki = Wiki.getByUser(user) self.response.out.write( template.render( 'templates/index.html', { 'user': user, 'logout_url': users.create_logout_url(self.request.path), 'login_url': users.create_login_url('/_onlogin'), 'wiki': wiki }))