Skip to content

WSGIRequest object has no attribute user #37

@Amonimus

Description

@Amonimus

e: removing the package still didn't fix, so I doubt it was related.

Old post After installing django-crum, if I at any point call request.user, django.contrib.staticfiles responds with 404 to everything and the site crashes with: "AttributeError: 'WSGIRequest' object has no attribute 'user'"

Django==4.2.14
django-crum==0.7.9

MIDDLEWARE =
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'crum.CurrentRequestUserMiddleware'

"crum.CurrentRequestUserMiddleware" is the only addition in the project. If I remove "crum.CurrentRequestUserMiddleware", everything works fine. I guess crum isn't compatible with the current Django version?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions