Fixed #24036 -- Added ignore_warnings decorator

It seems of limited use since I don't think anyone will be silencing deprecation warnings in older versions of Django from now on, but it doesn't hurt if you want to keep it.