def get(self): user = users.get_current_user() if user: context = { 'user': user, 'logout': users.create_logout_url(self.request.uri)} else: context = { 'login': users.create_login_url('/login')} context['gyms'] = [Gym.all().fetch(20)] tmpl = path.join(path.dirname(__file__), 'static/html/gyms.html') self.response.out.write(render(tmpl, context))
def get(self): gyms = Gym.all().getch(20) context = { 'gyms': gyms} tmpl = path.join(path.dirname(__file__), 'static/html/admin.html') self.response.out.write(render(tmpl, context))