Пример #1
0
 def get(self):
     order = self.request.GET.get('order', 'value')
     if order == 'receivers':
         badges = list(Badge.all())
         badges.sort(key=lambda i: i.awards.count())
     else:
         badges = Badge.gql('ORDER BY ' + order)
     self.render_template('badges', {'badges': badges})
Пример #2
0
 def get(self):
     order = self.request.GET.get('order', 'value')
     if order == 'receivers':
         b = list(Badge.all())
         b.sort(key=lambda i:i.awards.count())
     else:
         b = Badge.gql('ORDER BY ' + order)
     self.render_template('badges', {'badges': b})
Пример #3
0
 def get(self):
     self.render_template('admin', {
         'badges': Badge.all(),
         'members': Member.all(),
     })
Пример #4
0
 def get(self):
     self.render_template('admin', {
         'badges': Badge.all(),
         'members': Member.all(),
     })
Пример #5
0
 def get(self):
     self.render_template('admin', {
         'badges': Badge.all(),
         'hackers': Hacker.all()
     })
Пример #6
0
 def get(self):
     self.render_template('admin', {'badges': Badge.all(),
                                    'hackers': Hacker.all()})