Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSGIRequest object has no attribute user #37

Open
Amonimus opened this issue Jan 11, 2025 · 0 comments
Open

WSGIRequest object has no attribute user #37

Amonimus opened this issue Jan 11, 2025 · 0 comments

Comments

@Amonimus
Copy link

Amonimus commented Jan 11, 2025

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant