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

Comma missing in MIDDLEWARE_CLASSES breaks things for Django <2 #76

Closed
code-review-doctor opened this issue Jan 4, 2022 · 0 comments
Closed
Assignees

Comments

@code-review-doctor
Copy link

The lack of comma here on line 43:

MIDDLEWARE_CLASSES = [
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware'
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
]

results in implicit string concatenation, so 'django.contrib.messages.middleware.MessageMiddleware' will get concatenated with the next line 'django.contrib.sessions.middleware.SessionMiddleware', resulting in Django attempting to import a class from 'django.contrib.messages.middleware.MessageMiddlewaredjango.contrib.sessions.middleware.SessionMiddleware', which will of course fail.

It looks like Django <2.0 is still supported so I think this should be fixed

I can make a PR for you :)

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

2 participants