mirror of
https://github.com/Hopiu/django.git
synced 2026-05-17 20:11:06 +00:00
Thanks Tim Graham for polishing the patch, updating the tests, and writing documentation. Thanks Carl Meyer for shepherding the DEP.
10 lines
245 B
Python
10 lines
245 B
Python
import copy
|
|
|
|
from django.conf import settings
|
|
|
|
|
|
def patch_middleware_message(error):
|
|
if settings.MIDDLEWARE is None:
|
|
error = copy.copy(error)
|
|
error.msg = error.msg.replace('MIDDLEWARE', 'MIDDLEWARE_CLASSES')
|
|
return error
|