Index: django/contrib/admin/sites.py
===================================================================
--- django/contrib/admin/sites.py	(revision 8603)
+++ django/contrib/admin/sites.py	(working copy)
@@ -386,17 +386,17 @@
                             'admin_url': '%s/' % model.__name__.lower(),
                             'perms': perms,
                         }
-                    if app_dict:
-                        app_dict['models'].append(model_dict),
-                    else:
-                        app_dict = {
-                            'name': app_label.title(),
-                            'app_url': '',
-                            'has_module_perms': has_module_perms,
-                            'models': [model_dict],
-                        }
-                    if not app_dict:
-                        raise http.Http404('The requested admin page does not exist.')
+                        if app_dict:
+                            app_dict['models'].append(model_dict),
+                        else:
+                            app_dict = {
+                                'name': app_label.title(),
+                                'app_url': '',
+                                'has_module_perms': has_module_perms,
+                                'models': [model_dict],
+                            }
+        if not app_dict:
+            raise http.Http404('The requested admin page does not exist.')
         # Sort the models alphabetically within each app.
         app_dict['models'].sort(lambda x, y: cmp(x['name'], y['name']))
         context = {
