Commit 0e3d8bcb authored by Chris Beaven's avatar Chris Beaven
Browse files

Removing the old url resolution method in contrib.auth.admin.UserAdmin which...

Removing the old url resolution method in contrib.auth.admin.UserAdmin which was deprecated in Django 1.1

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16621 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 283526a5
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -55,15 +55,6 @@ class UserAdmin(admin.ModelAdmin):
    ordering = ('username',)
    filter_horizontal = ('user_permissions',)

    def __call__(self, request, url):
        # this should not be here, but must be due to the way __call__ routes
        # in ModelAdmin.
        if url is None:
            return self.changelist_view(request)
        if url.endswith('password'):
            return self.user_change_password(request, url.split('/')[0])
        return super(UserAdmin, self).__call__(request, url)

    def get_fieldsets(self, request, obj=None):
        if not obj:
            return self.add_fieldsets