The Debug Toolbar module interferes with images

0

You see, I have installed a module called "debug toolbar", which is used to view DJango performance data. When I'm in the Admin it works without problems, but if I'm in a view where images are shown, it causes an error: 'ImageFieldFile' object has no attribute 'endswith' .

As far as I know, this was solved by putting this code in the settings:

INTERCEPT_REDIRECT=False

But it has not worked. What should I do?

More information:

settings:

MIDDLEWARE_CLASSES = (
    'debug_toolbar.middleware.DebugToolbarMiddleware',
)

INTERNAL_IPS = ('127.0.0.1',)

url located in the same settings folder:

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += [
        url(r'^__debug__/', include(debug_toolbar.urls)),
    ]

By the way, I have verified that if I remove the INTERNAL_IPS code, the module is not activated and I can use the project in a normal way.

    
asked by Miguel Alparez 18.05.2017 в 20:29
source

0 answers