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 #145

Closed
code-review-doctor opened this issue Jan 4, 2022 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@code-review-doctor
Copy link

code-review-doctor commented Jan 4, 2022

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
https://github.com/fabiocaccamo/django-admin-interface/blob/master/setup.py#L53

I can make a PR for you :)

@code-review-doctor code-review-doctor added the bug Something isn't working label Jan 4, 2022
@fabiocaccamo
Copy link
Owner

@code-review-doctor thanks for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants