Beispiel #1
0
 def get(self):
     contention_query = Contention.all().order('-date')
     latest = contention_query.fetch(10)
     count = int(cons.count(10)) + 1
     data = {
         "latest": latest,
         "count": count,
     }
     self.response.out.write(json.dumps(data))
Beispiel #2
0
    def get(self):
        contention_query = Contention.all().order('-date')
        cons = contention_query.fetch(10)
        count = "0"  #int(cons.count(10))+1
        branch_query = Branch.all().order('branch')
        branches = branch_query.fetch(10)
        #images = con.images.fetch(10)

        # if users.get_current_user():
        # url = users.create_logout_url(self.request.uri)
        # url_linktext = 'Logout'
        # else:
        # url = users.create_login_url(self.request.uri)
        # url_linktext = 'Login'

        params = {
            'cons': cons,
            'branches': branches,
            'count': count,
        }
        return self.render('index.html', params)