Skip to content

Commit

Permalink
Moved RedirectAdmin in django.contrib.redirects to an admin.py module.
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8018 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
brosner committed Jul 21, 2008
1 parent 9706118 commit 4f1cbaa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 deletions.
11 changes: 11 additions & 0 deletions django/contrib/redirects/admin.py
Original file line number Diff line number Diff line change
@@ -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)
15 changes: 0 additions & 15 deletions django/contrib/redirects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 4f1cbaa

Please sign in to comment.