Django global login required middleware error

555 Views Asked by At

I'm using Django to make a website

In the website, users can have access to all pages only after they log in the website other than login page.

So, I did pip install django-glrm and added 'global_login_required.GlobalLoginRequiredMiddleware' in MIDDLEWARE in settings.py

Here is the reference https://django-glrm.readthedocs.io/en/latest/readme.html

After installing, I just added @login_not_required to login function and it worked for several days.

However, today I ran into an error.

Not Found http://127.0.0.1:8000/accounts/login/?next=/

What is the problem?

After erasing 'global_login_required.GlobalLoginRequiredMiddleware' in settings.py, it does not show the error but login required does not work of course.

Please let me know it you have an idea

0

There are 0 best solutions below