Ticket #4516: handle_url.diff

File handle_url.diff, 682 bytes (added by Marty Alchin <gulopine@…>, 8 years ago)

Simple patch to make ModelAdmin URL handling more flexible for subclasses

  • django/contrib/admin/options.py

     
    132132                raise ImproperlyConfigured("Put 'django.core.context_processors.auth' in your TEMPLATE_CONTEXT_PROCESSORS setting in order to use the admin application.")
    133133
    134134        # Delegate to the appropriate method, based on the URL.
     135        return self.handle_url(request, url)
     136
     137    def handle_url(self, request, url):
    135138        if url is None:
    136139            return self.changelist_view(request)
    137140        elif url.endswith('add'):
Back to Top