openwisp / openwisp-ipam

IP address space administration module of OpenWISP
https://openwisp.io/docs/dev/ipam/
BSD 3-Clause "New" or "Revised" License
104 stars 51 forks source link

Bug: Incorrect Middleware Reference in settings.py for django-allauth #171

Closed yours7himanshu closed 1 week ago

yours7himanshu commented 2 weeks ago

@pandafy Description: While setting up django-allauth in my Django project, I encountered an issue when attempting to add allauth.account.middleware.AccountMiddleware to the MIDDLEWARE configuration in settings.py. Including this line caused Django to throw a ModuleNotFoundError, as django-allauth does not include any middleware by this name.

Steps to Reproduce:

Add 'allauth.account.middleware.AccountMiddleware' to the MIDDLEWARE list in settings.py.

Run the Django development server with python manage.py runserver.

Observe the following error:

plaintext Copy code ModuleNotFoundError: No module named 'allauth.account.middleware' Expected Behavior: The django-allauth setup should not include middleware references that do not exist in the package. Removing the line resolves the error, as django-allauth does not require any middleware.

Suggested Solution:

Update documentation or installation guides to clarify that django-allauth does not require additional middleware in settings.py, potentially avoiding confusion.

System Informatioon: Ubuntu 22.04LTS Screenshot from 2024-10-30 20-06-41

pandafy commented 1 week ago

Closing this since this was an dependency issue in your local env.