Django

Code

Changeset 4950

Show
Ignore:
Timestamp:
04/06/07 23:38:09 (2 years ago)
Author:
adrian
Message:

newforms-admin: Converted django.contrib.redirects model admin options to use new syntax

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/newforms-admin/django/contrib/redirects/models.py

    r4265 r4950  
    1717        ordering = ('old_path',) 
    1818 
    19     class Admin: 
    20         list_filter = ('site',) 
    21         search_fields = ('old_path', 'new_path') 
    22  
    2319    def __str__(self): 
    2420        return "%s ---> %s" % (self.old_path, self.new_path) 
     21 
     22# Register the admin options for these models. 
     23# TODO: Maybe this should live in a separate module admin.py, but how would we 
     24# ensure that module was loaded? 
     25 
     26from django.contrib import admin 
     27 
     28class RedirectAdmin(admin.ModelAdmin): 
     29    list_filter = ('site',) 
     30    search_fields = ('old_path', 'new_path') 
     31 
     32admin.site.register(Redirect, RedirectAdmin)