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

ModuleNotFoundError: No module named 'django_multitenant.middleware' #208

Open
hexmo opened this issue Dec 19, 2023 · 0 comments
Open

ModuleNotFoundError: No module named 'django_multitenant.middleware' #208

hexmo opened this issue Dec 19, 2023 · 0 comments

Comments

@hexmo
Copy link

hexmo commented Dec 19, 2023

Problem

I got this error when integrating this library with the Django Rest Framework. I was following this guide. But after adding this section to my setting.py file, I got the above error.

MIDDLEWARE = [
    # other middleware
    'django_multitenant.middleware.MultitenantMiddleware',
]

I wasted a lot of time rechecking and reinstalling the project ensuring everything was done as outlined by the documentation. However, there was a minor spelling mistake in the documentation itself. The middlewares module is shown as middleware in the docs that I discovered after checking the source code.

Solution

MIDDLEWARE = [
    # other middleware
    # Add the missing 's' to middleware
    'django_multitenant.middlewares.MultitenantMiddleware',
]
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