Django

Code

Show
Ignore:
Timestamp:
07/21/08 11:01:05 (6 months ago)
Author:
brosner
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/redirects/models.py

    r7967 r8018  
    1919    def __unicode__(self): 
    2020        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  
    26 from django.contrib import admin 
    27  
    28 class RedirectAdmin(admin.ModelAdmin): 
    29     list_display = ('old_path', 'new_path') 
    30     list_filter = ('site',) 
    31     search_fields = ('old_path', 'new_path') 
    32     radio_fields = {'site': admin.VERTICAL} 
    33  
    34 admin.site.register(Redirect, RedirectAdmin) 
    35