Ticket #4222: changelist_override.diff

File changelist_override.diff, 881 bytes (added by Øyvind Saltvik <oyvind@…>, 8 years ago)

proposed patch

  • django/contrib/admin/options.py

     
    113113    prepopulated_fields = {}
    114114    filter_vertical = ()
    115115    filter_horizontal = ()
     116    changelist = None
    116117
    117118    def __init__(self, model):
    118119        self.model = model
     
    476477
    477478    def changelist_view(self, request):
    478479        "The 'change list' admin view for this model."
    479         from django.contrib.admin.views.main import ChangeList, ERROR_FLAG
     480        from django.contrib.admin.views.main import ChangeList as default_changelist, ERROR_FLAG
     481        ChangeList = self.changelist or default_changelist
    480482        opts = self.model._meta
    481483        app_label = opts.app_label
    482484        if not self.has_change_permission(request, None):
Back to Top