示例#1
0
 def render(self):
     categories = meidodb.get_categories()
     l = ['<li><a href="/category/{0}">{1} ({2})</a></li>'.format(
             base64.urlsafe_b64encode(category['category']),
             category['category'],
             category['count'])
          for category in categories]
     return ''.join(l)
示例#2
0
 def render(self):
     categories = meidodb.get_categories()
     l = [
         '<li><a href="/category/{0}">{1} ({2})</a></li>'.format(
             base64.urlsafe_b64encode(category['category']),
             category['category'], category['count'])
         for category in categories
     ]
     return ''.join(l)
示例#3
0
 def render(self, default):
     
     categories = meidodb.get_categories()
     l = []
     for category in categories:
         if category['category'] == default:
             l.append('<option selected="selected">' + category['category'] + '</option>')
         else:
             l.append('<option>' + category['category'] + '</option>')
     return ''.join(l)
示例#4
0
    def render(self, default):

        categories = meidodb.get_categories()
        l = []
        for category in categories:
            if category['category'] == default:
                l.append('<option selected="selected">' +
                         category['category'] + '</option>')
            else:
                l.append('<option>' + category['category'] + '</option>')
        return ''.join(l)