Authenticate a set of views instead of each one

Hi!

Is there a way to limit access to logged in users to “routes”?

Instead of putting a LoginRequiredMixin in each CBV, I want to put it in urlpatterns for example.

Thanks in advance.

This is an open ticket: #31405.

Whilst this is pending merging into Django core, you can use the third party package django-stronghold.

1 Like