Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8018 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4f1cbaa93e2684f900fb350267a6092ea8c2bd95 1 parent 9706118
@brosner brosner authored
View
11 django/contrib/redirects/admin.py
@@ -0,0 +1,11 @@
+
+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)
View
15 django/contrib/redirects/models.py
@@ -18,18 +18,3 @@ class Meta:
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)
-
Please sign in to comment.
Something went wrong with that request. Please try again.