Commits

Anonymous committed 52921d7

Moved RedirectAdmin in django.contrib.redirects to an admin.py module.

  • Participants
  • Parent commits 44d5a66

Comments (0)

Files changed (2)

File django/contrib/redirects/admin.py

+
+from django.contrib import admin
+from django.contrib.redirects.models import Redirect
+
+class RedirectAdmin(admin.ModelAdmin):
+    list_display = ('old_path', 'new_path')
+    list_filter = ('site',)
+    search_fields = ('old_path', 'new_path')
+    radio_fields = {'site': admin.VERTICAL}
+
+admin.site.register(Redirect, RedirectAdmin)

File django/contrib/redirects/models.py

     
     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_display = ('old_path', 'new_path')
-    list_filter = ('site',)
-    search_fields = ('old_path', 'new_path')
-    radio_fields = {'site': admin.VERTICAL}
-
-admin.site.register(Redirect, RedirectAdmin)
-