Ticket #7954: remove_dead_code.patch

File remove_dead_code.patch, 688 bytes (added by Matthias Kestenholz, 16 years ago)
  • django/contrib/admin/options.py

    diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
    index 1df399b..20da595 100644
    a b class ModelAdmin(BaseModelAdmin):  
    467467        if not self.has_add_permission(request):
    468468            raise PermissionDenied
    469469
    470         if self.has_change_permission(request, None):
    471             # redirect to list view
    472             post_url = '../'
    473         else:
    474             # Object list will give 'Permission Denied', so go back to admin home
    475             post_url = '../../../'
    476 
    477470        ModelForm = self.get_form(request)
    478471        inline_formsets = []
    479472        obj = self.model()
Back to Top