=== added file 'django/conf/app_template/admin.py'
--- django/conf/app_template/admin.py	1970-01-01 00:00:00 +0000
+++ django/conf/app_template/admin.py	2007-11-13 02:15:58 +0000
@@ -0,0 +1,5 @@
+from django.contrib import admin
+import models
+
+def register(site_admin):
+    pass # Register your models here.

=== added file 'django/conf/project_template/admin.py'
--- django/conf/project_template/admin.py	1970-01-01 00:00:00 +0000
+++ django/conf/project_template/admin.py	2007-11-13 02:15:59 +0000
@@ -0,0 +1,10 @@
+from django.contrib import admin
+
+# Import admins from your or contrib applications.
+from django.contrib.auth import admin as auth_admin
+from django.contrib.sites import admin as sites_admin
+
+# Register admins from your or contrib applications.
+admin_site = admin.AdminSite()
+auth_admin.register(admin_site)
+sites_admin.register(admin_site)

=== added file 'django/contrib/auth/admin.py'
--- django/contrib/auth/admin.py	1970-01-01 00:00:00 +0000
+++ django/contrib/auth/admin.py	2007-11-13 02:15:58 +0000
@@ -0,0 +1,28 @@
+from django.utils.translation import ugettext as _
+from django.contrib import admin
+from django.contrib.auth import models
+
+class GroupAdmin(admin.ModelAdmin):
+    search_fields = ('name',)
+    filter_horizontal = ('permissions',)
+
+class UserAdmin(admin.ModelAdmin):
+    fieldsets = (
+        (None, {'fields': ('username', 'password')}),
+        (_('Personal info'), {'fields': ('first_name', 'last_name', 'email')}),
+        (_('Permissions'), {'fields': ('is_staff', 'is_active', 'is_superuser', 'user_permissions')}),
+        (_('Important dates'), {'fields': ('last_login', 'date_joined')}),
+        (_('Groups'), {'fields': ('groups',)}),
+    )
+    list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff')
+    list_filter = ('is_staff', 'is_superuser')
+    search_fields = ('username', 'first_name', 'last_name', 'email')
+    filter_horizontal = ('user_permissions',)
+
+    def add_view(self, request):
+        from django.contrib.admin.views.auth import user_add_stage
+        return user_add_stage(request)
+
+def register(admin_site):
+    admin_site.register(models.Group, GroupAdmin)
+    admin_site.register(models.User, UserAdmin)

=== added file 'django/contrib/comments/admin.py'
--- django/contrib/comments/admin.py	1970-01-01 00:00:00 +0000
+++ django/contrib/comments/admin.py	2007-11-13 02:15:58 +0000
@@ -0,0 +1,30 @@
+from django.contrib import admin
+from django.contrib.comments import models
+
+class CommentAdmin(admin.ModelAdmin):
+    fieldsets = (
+        (None, {'fields': ('content_type', 'object_id', 'site')}),
+        ('Content', {'fields': ('user', 'headline', 'comment')}),
+        ('Ratings', {'fields': ('rating1', 'rating2', 'rating3', 'rating4', 'rating5', 'rating6', 'rating7', 'rating8', 'valid_rating')}),
+        ('Meta', {'fields': ('is_public', 'is_removed', 'ip_address')}),
+    )
+    list_display = ('user', 'submit_date', 'content_type', 'get_content_object')
+    list_filter = ('submit_date',)
+    date_hierarchy = 'submit_date'
+    search_fields = ('comment', 'user__username')
+    raw_id_fields = ('user',)
+
+class FreeCommentAdmin(admin.ModelAdmin):
+    fieldsets = (
+        (None, {'fields': ('content_type', 'object_id', 'site')}),
+        ('Content', {'fields': ('person_name', 'comment')}),
+        ('Meta', {'fields': ('submit_date', 'is_public', 'ip_address', 'approved')}),
+    )
+    list_display = ('person_name', 'submit_date', 'content_type', 'get_content_object')
+    list_filter = ('submit_date',)
+    date_hierarchy = 'submit_date'
+    search_fields = ('comment', 'person_name')
+
+def register(admin_site):
+    admin_site.register(models.Comment, CommentAdmin)
+    admin_site.register(models.FreeComment, FreeCommentAdmin)

=== added file 'django/contrib/flatpages/admin.py'
--- django/contrib/flatpages/admin.py	1970-01-01 00:00:00 +0000
+++ django/contrib/flatpages/admin.py	2007-11-13 02:15:58 +0000
@@ -0,0 +1,13 @@
+from django.contrib import admin
+from django.contrib.flatpages import models
+
+class FlatPageAdmin(admin.ModelAdmin):
+    fieldsets = (
+        (None, {'fields': ('url', 'title', 'content', 'sites')}),
+        ('Advanced options', {'classes': 'collapse', 'fields': ('enable_comments', 'registration_required', 'template_name')}),
+    )
+    list_filter = ('sites',)
+    search_fields = ('url', 'title')
+
+def register(admin_site):
+    admin_site.register(models.FlatPage, FlatPageAdmin)

=== added file 'django/contrib/redirects/admin.py'
--- django/contrib/redirects/admin.py	1970-01-01 00:00:00 +0000
+++ django/contrib/redirects/admin.py	2007-11-13 02:15:58 +0000
@@ -0,0 +1,10 @@
+from django.contrib import admin
+from django.contrib.redirects import models
+
+class RedirectAdmin(admin.ModelAdmin):
+    list_filter = ('site',)
+    search_fields = ('old_path', 'new_path')
+
+def register(admin_site):
+    admin_site.register(models.Redirect, RedirectAdmin)
+

=== added file 'django/contrib/sites/admin.py'
--- django/contrib/sites/admin.py	1970-01-01 00:00:00 +0000
+++ django/contrib/sites/admin.py	2007-11-13 02:15:58 +0000
@@ -0,0 +1,9 @@
+from django.contrib import admin
+from django.contrib.sites import models
+
+class SiteAdmin(admin.ModelAdmin):
+    list_display = ('domain', 'name')
+    search_fields = ('domain', 'name')
+
+def register(site):
+    site.register(models.Site, SiteAdmin)

=== modified file 'django/conf/project_template/urls.py'
--- django/conf/project_template/urls.py	2007-11-13 02:22:10 +0000
+++ django/conf/project_template/urls.py	2007-11-13 02:15:59 +0000
@@ -1,7 +1,7 @@
 from django.conf.urls.defaults import *
 
 # Uncomment this for admin:
-#from django.contrib import admin
+#import admin
 
 urlpatterns = patterns('',
     # Example:
@@ -11,5 +11,5 @@
     #(r'^admin/doc/', include('django.contrib.admindocs.urls')),
 
     # Uncomment this for admin:
-    #('^admin/(.*)', admin.site.root),
+    #('^admin/(.*)', admin.admin_site.root),
 )

=== modified file 'django/contrib/admin/__init__.py'
--- django/contrib/admin/__init__.py	2007-11-13 02:22:08 +0000
+++ django/contrib/admin/__init__.py	2007-11-13 02:15:58 +0000
@@ -1,3 +1,3 @@
 from django.contrib.admin.options import ModelAdmin
 from django.contrib.admin.options import StackedInline, TabularInline
-from django.contrib.admin.sites import AdminSite, site
+from django.contrib.admin.sites import AdminSite

=== modified file 'django/contrib/admin/sites.py'
--- django/contrib/admin/sites.py	2007-11-13 02:22:09 +0000
+++ django/contrib/admin/sites.py	2007-11-15 17:16:19 +0000
@@ -300,3 +300,4 @@
 # This global object represents the default admin site, for the common case.
 # You can instantiate AdminSite in your own code to create a custom admin site.
 site = AdminSite()
+

=== modified file 'django/contrib/auth/models.py'
--- django/contrib/auth/models.py	2007-11-13 02:22:08 +0000
+++ django/contrib/auth/models.py	2007-11-13 02:15:58 +0000
@@ -364,33 +364,3 @@
 
     def is_authenticated(self):
         return False
-
-# Register the admin options for these models.
-# TODO: Maybe this should live in a separate module admin.py, but how would we
-# ensure that module was loaded?
-
-from django.contrib import admin
-
-class GroupAdmin(admin.ModelAdmin):
-    search_fields = ('name',)
-    filter_horizontal = ('permissions',)
-
-class UserAdmin(admin.ModelAdmin):
-    fieldsets = (
-        (None, {'fields': ('username', 'password')}),
-        (_('Personal info'), {'fields': ('first_name', 'last_name', 'email')}),
-        (_('Permissions'), {'fields': ('is_staff', 'is_active', 'is_superuser', 'user_permissions')}),
-        (_('Important dates'), {'fields': ('last_login', 'date_joined')}),
-        (_('Groups'), {'fields': ('groups',)}),
-    )
-    list_display = ('username', 'email', 'first_name', 'last_name', 'is_staff')
-    list_filter = ('is_staff', 'is_superuser')
-    search_fields = ('username', 'first_name', 'last_name', 'email')
-    filter_horizontal = ('user_permissions',)
-
-    def add_view(self, request):
-        from django.contrib.admin.views.auth import user_add_stage
-        return user_add_stage(request)
-
-admin.site.register(Group, GroupAdmin)
-admin.site.register(User, UserAdmin)

=== modified file 'django/contrib/comments/models.py'
--- django/contrib/comments/models.py	2007-11-13 02:22:08 +0000
+++ django/contrib/comments/models.py	2007-11-13 02:15:58 +0000
@@ -273,36 +273,3 @@
 
     def __repr__(self):
         return _("Moderator deletion by %r") % self.user
-
-# Register the admin options for these models.
-# TODO: Maybe this should live in a separate module admin.py, but how would we
-# ensure that module was loaded?
-
-from django.contrib import admin
-
-class CommentAdmin(admin.ModelAdmin):
-    fieldsets = (
-        (None, {'fields': ('content_type', 'object_id', 'site')}),
-        ('Content', {'fields': ('user', 'headline', 'comment')}),
-        ('Ratings', {'fields': ('rating1', 'rating2', 'rating3', 'rating4', 'rating5', 'rating6', 'rating7', 'rating8', 'valid_rating')}),
-        ('Meta', {'fields': ('is_public', 'is_removed', 'ip_address')}),
-    )
-    list_display = ('user', 'submit_date', 'content_type', 'get_content_object')
-    list_filter = ('submit_date',)
-    date_hierarchy = 'submit_date'
-    search_fields = ('comment', 'user__username')
-    raw_id_fields = ('user',)
-
-class FreeCommentAdmin(admin.ModelAdmin):
-    fieldsets = (
-        (None, {'fields': ('content_type', 'object_id', 'site')}),
-        ('Content', {'fields': ('person_name', 'comment')}),
-        ('Meta', {'fields': ('submit_date', 'is_public', 'ip_address', 'approved')}),
-    )
-    list_display = ('person_name', 'submit_date', 'content_type', 'get_content_object')
-    list_filter = ('submit_date',)
-    date_hierarchy = 'submit_date'
-    search_fields = ('comment', 'person_name')
-
-admin.site.register(Comment, CommentAdmin)
-admin.site.register(FreeComment, FreeCommentAdmin)

=== modified file 'django/contrib/flatpages/models.py'
--- django/contrib/flatpages/models.py	2007-11-13 02:22:08 +0000
+++ django/contrib/flatpages/models.py	2007-11-13 02:15:58 +0000
@@ -25,19 +25,3 @@
 
     def get_absolute_url(self):
         return self.url
-
-# Register the admin options for these models.
-# TODO: Maybe this should live in a separate module admin.py, but how would we
-# ensure that module was loaded?
-
-from django.contrib import admin
-
-class FlatPageAdmin(admin.ModelAdmin):
-    fieldsets = (
-        (None, {'fields': ('url', 'title', 'content', 'sites')}),
-        ('Advanced options', {'classes': 'collapse', 'fields': ('enable_comments', 'registration_required', 'template_name')}),
-    )
-    list_filter = ('sites',)
-    search_fields = ('url', 'title')
-
-admin.site.register(FlatPage, FlatPageAdmin)

=== modified file 'django/contrib/redirects/models.py'
--- django/contrib/redirects/models.py	2007-11-13 02:22:08 +0000
+++ django/contrib/redirects/models.py	2007-11-13 02:15:58 +0000
@@ -18,16 +18,3 @@
 
     def __unicode__(self):
         return "%s ---> %s" % (self.old_path, self.new_path)
-
-# Register the admin options for these models.
-# TODO: Maybe this should live in a separate module admin.py, but how would we
-# ensure that module was loaded?
-
-from django.contrib import admin
-
-class RedirectAdmin(admin.ModelAdmin):
-    list_filter = ('site',)
-    search_fields = ('old_path', 'new_path')
-
-admin.site.register(Redirect, RedirectAdmin)
-

=== modified file 'django/contrib/sites/models.py'
--- django/contrib/sites/models.py	2007-11-13 02:22:08 +0000
+++ django/contrib/sites/models.py	2007-11-13 02:15:58 +0000
@@ -42,18 +42,6 @@
     def __unicode__(self):
         return self.domain
 
-# Register the admin options for these models.
-# TODO: Maybe this should live in a separate module admin.py, but how would we
-# ensure that module was loaded?
-
-from django.contrib import admin
-
-class SiteAdmin(admin.ModelAdmin):
-    list_display = ('domain', 'name')
-    search_fields = ('domain', 'name')
-
-admin.site.register(Site, SiteAdmin)
-
 class RequestSite(object):
     """
     A class that shares the primary interface of Site (i.e., it has

