Пример #1
0
    def get(self):
        agencies = utils.get_all_agencies()
        agency_count = utils.get_agency_count()

        self.render('agencies_astable.html',
                    agencies=agencies,
                    agency_count=agency_count)
Пример #2
0
 def get(self):
     agencies = utils.get_all_agencies()
     data = [[agency.lastupdate, agency] for agency in agencies]
     data.sort(reverse=True)
     agencies = [x[-1] for x in data]
     agency_count = utils.get_agency_count()
     
     self.render('agencies_bylastupdate.html', agencies=agencies, agency_count=agency_count)
Пример #3
0
 def get(self):
     recent_agencies = utils.get_recent_agencies()
     recent_messages = utils.get_recent_messages()
     agency_count = utils.get_agency_count()
     
     self.render('index.html', recent_messages=recent_messages,
                               recent_agencies=recent_agencies,
                               agency_count=agency_count)
Пример #4
0
 def get(self):
     agencies = utils.get_all_agencies()
     # data = [[agency.country_name, agency.state_name, agency.name, agency] for agency in agencies]
     # data.sort()
     # agencies = [x[-1] for x in data]
     agency_count = utils.get_agency_count()
     
     self.render('agencies_bylocation.html', agencies=agencies, agency_count=agency_count)
Пример #5
0
    def get(self):
        recent_agencies = utils.get_recent_agencies()
        recent_messages = utils.get_recent_messages()[:7]
        agency_count = utils.get_agency_count()

        self.render('index.html',
                    recent_messages=recent_messages,
                    recent_agencies=recent_agencies,
                    agency_count=agency_count)
Пример #6
0
    def get(self):
        agencies = utils.get_all_agencies()
        data = [[agency.lastupdate, agency] for agency in agencies]
        data.sort(reverse=True)
        agencies = [x[-1] for x in data]
        agency_count = utils.get_agency_count()

        self.render('agencies_bylastupdate.html',
                    agencies=agencies,
                    agency_count=agency_count)
Пример #7
0
    def get(self):
        agencies = utils.get_all_agencies()
        # data = [[agency.country_name, agency.state_name, agency.name, agency] for agency in agencies]
        # data.sort()
        # agencies = [x[-1] for x in data]
        agency_count = utils.get_agency_count()

        self.render('agencies_bylocation.html',
                    agencies=agencies,
                    agency_count=agency_count)
Пример #8
0
 def get(self):
     agencies = utils.get_all_agencies()
     
     grouped = {}
     for agency in agencies:
         letter = agency.name[0].upper()
         if letter not in grouped:
             grouped[letter] = []
         grouped[letter].append(agency)
     
     grouped = grouped.items()
     grouped.sort()
     agency_count = utils.get_agency_count()
     
     self.render('agencies.html', agencies=agencies,
                                 grouped_agencies=grouped,
                                 agency_count=agency_count)
Пример #9
0
    def get(self):
        agencies = utils.get_all_agencies()

        grouped = {}
        for agency in agencies:
            letter = agency.name[0].upper()
            if letter not in grouped:
                grouped[letter] = []
            grouped[letter].append(agency)

        grouped = grouped.items()
        grouped.sort()
        agency_count = utils.get_agency_count()

        self.render('agencies.html',
                    agencies=agencies,
                    grouped_agencies=grouped,
                    agency_count=agency_count)
Пример #10
0
 def get(self):
     agencies = utils.get_all_agencies()
     agency_count = utils.get_agency_count()
     
     self.render('agencies_astable.html', agencies=agencies, agency_count=agency_count)