Django

Code

Changeset 8487

Show
Ignore:
Timestamp:
08/23/08 11:27:12 (10 months ago)
Author:
brosner
Message:

Fixed #8498 -- Add the ability to customize the template for app_index similar to the other views on the AdminSite? class. Thanks Jannis Leidel for the patch.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/admin/sites.py

    r8484 r8487  
    4848    index_template = None 
    4949    login_template = None 
     50    app_index_template = None 
    5051 
    5152    def __init__(self): 
     
    398399        # Sort the models alphabetically within each app. 
    399400        app_dict['models'].sort(lambda x, y: cmp(x['name'], y['name'])) 
    400         return render_to_response('admin/app_index.html', { 
     401        return render_to_response(self.app_index_template or 'admin/app_index.html', { 
    401402            'title': _('%s administration' % capfirst(app_label)), 
    402403            'app_list': [app_dict]