Ticket #6946: 6946_python23.diff

File 6946_python23.diff, 692 bytes (added by axiak, 7 years ago)

Python2.3 compatible

  • contrib/databrowse/sites.py

     
    123123
    124124    def index(self, request):
    125125        m_list = [EasyModel(self, m) for m in self.registry.keys()]
     126        # Now we sort the model list alphabetically.
     127        m_list = [(x.__name__.lower(), x) for x in m_list]
     128        m_list.sort()
     129        m_list = [x[1] for x in m_list]
    126130        return render_to_response('databrowse/homepage.html', {'model_list': m_list, 'root_url': self.root_url})
    127131
    128132    def model_page(self, request, app_label, model_name, rest_of_url=None):
Back to Top