diff --git a/django/contrib/databrowse/sites.py b/django/contrib/databrowse/sites.py
index 5d8c1c8..d33a00c 100644
a
|
b
|
class DatabrowseSite(object):
|
122 | 122 | raise http.Http404('The requested databrowse page does not exist.') |
123 | 123 | |
124 | 124 | def index(self, request): |
125 | | m_list = [EasyModel(self, m) for m in self.registry.keys()] |
| 125 | # sort by name, using case insensitive sorting |
| 126 | if 'sorted' in __builtins__.__dict__: #python2.5 |
| 127 | m_list = [EasyModel(self, m) for m in sorted(self.registry.keys(), key = lambda x: x.__name__.upper())] |
| 128 | else: #python2.4 compatibility |
| 129 | sorted_keys = [m for m in self.registry.keys()] |
| 130 | sorted_keys.sort(key = lambda x: x.__name__.upper()) |
| 131 | m_list = [EasyModel(self, m) for m in sorted_keys] |
126 | 132 | return render_to_response('databrowse/homepage.html', {'model_list': m_list, 'root_url': self.root_url}) |
127 | 133 | |
128 | 134 | def model_page(self, request, app_label, model_name, rest_of_url=None): |