On Tue, Aug 6, 2024 at 4:37 PM אורי <u...@speedy.net> wrote:

> No. I didn't see in the documentation of LoginRequiredMiddleware
> any MIDDLEWARE setting.
>
>
> https://docs.djangoproject.com/en/5.1/ref/middleware/#django.contrib.auth.middleware.LoginRequiredMiddleware
>
>
> https://docs.djangoproject.com/en/5.1/releases/5.1/#middleware-to-require-authentication-by-default
>
> I thought that LoginRequiredMiddleware is always enabled in Django 5.1.
>

The set of middlewares which will be turned on by default when generating a
new project is documented:

https://docs.djangoproject.com/en/5.1/topics/http/middleware/#activating-middleware

Any middleware not listed there needs to be explicitly added to your
project's MIDDLEWARE setting before it will have any effect.

I don't see anything in the documentation of LoginRequiredMiddleware which
implies that it is enabled by default or will be turned on automatically by
upgrading Django. And I think it's highly unlikely the
LoginRequiredMiddleware would ever become a default-enabled middleware,
since people would probably be upset about suddenly having their sites
login-walled by a Django upgrade.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAL13Cg_wEWKBOkjnCzqiMH_n5jyycpgCnBQst84b8twq0Jc7DA%40mail.gmail.com.
  • Dja... אורי
    • ... 'Adam Johnson' via Django developers (Contributions to Django itself)
      • ... אורי
        • ... James Bennett
          • ... אורי
            • ... 'Adam Johnson' via Django developers (Contributions to Django itself)

Reply via email to