Channels: 'AsgiRequest' object has no attribute 'user'

Created on 20 Mar 2018  路  6Comments  路  Source: django/channels

After Installing channels 2.0, am getting this error when I visit the django admin site

blockeuser-response bug

Most helpful comment

Thanks sirs. The problem was my middleware settings. I hadn't realized that MIDDLEWARE_CLASSES was deprecated.

All 6 comments

Please include all the things the "new issue" template asks for - full tracebacks, versions of all your packages, etc. - or I can't help you. Also specifically your MIDDLEWARE setting would be good here too.

Thanks sirs. The problem was my middleware settings. I hadn't realized that MIDDLEWARE_CLASSES was deprecated.

hi
i have the same err
but i'm new to programming
so if you can demonstrate the way you fix the broblem

@mohammadtetouan I had the same issue and I changed MIDDLEWARE_CLASSES to MIDDLEWARE in settings.py as suggested by @muchwakande. That did the trick

I have MIDDLEWARE at my settings.py yet I am getting the same error

I have MIDDLEWARE at my settings.py yet I am getting the same error

Me too

Was this page helpful?
0 / 5 - 0 ratings