Ticket #6470: nfa-options.diff

File nfa-options.diff, 849 bytes (added by tlpinney, 17 years ago)
  • django/contrib/admin/options.py

    diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
    index ec32c89..0989600 100644
    a b class ModelAdmin(BaseModelAdmin):  
    246246        # Delegate to the appropriate method, based on the URL.
    247247        if url is None:
    248248            return self.changelist_view(request)
    249         elif url.endswith('add'):
     249        elif url == 'add':
    250250            return self.add_view(request)
    251         elif url.endswith('history'):
     251        elif url.endswith('/history'):
    252252            return self.history_view(request, unquote(url[:-8]))
    253         elif url.endswith('delete'):
     253        elif url.endswith('/delete'):
    254254            return self.delete_view(request, unquote(url[:-7]))
    255255        else:
    256256            return self.change_view(request, unquote(url))
Back to Top