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
This commit is contained in:
parent
970611827b
commit
4f1cbaa93e
|
@ -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)
|
|
@ -18,18 +18,3 @@ class Redirect(models.Model):
|
|||
|
||||
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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue