Suppose I have 3 apps in my Django website app_1, app_2, app_3. app_1 and app_2 can access any user, but for app_3 I want the user should log in.
login_required I can achieve this. But I have more than 30 views and urls. I don’t want to write
login_required decorator on every view function. Is there any other shortcut?
Just install it by:
pip install django-login-required-middleware
login_required.middleware.LoginRequiredMiddleware to MIDDLEWARE in