Skip to content

Middleware compatibility with Django 1.10 #853

Closed
@valignatev

Description

@valignatev

Since Django 1.10 introduced new middleware style, existing middlewares should be updated. For now I can suggest possible workaround for impatient Django 1.10 users:

from django.utils.deprecation import MiddlewareMixin
from debug_toolbar.middleware import DebugToolbarMiddleware


class AtopdedTo110DebugMiddleware(MiddlewareMixin, DebugToolbarMiddleware):
    pass

And then add it to your MIDDLEWARE settings:

MIDDLEWARE += ['my.middleware.AtopdedTo110DebugMiddleware']

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions