Is there a way to check authentication other than declaring the following check in each action in my views.
if request.user.is_authenticated():
# Do something for authenticated users.
else:
# Do something for anonymous users.
I would like to avoid having to do this for all my view actions, is there some sort of @Decorators that can be used with the provided auth.login to check authentication before user is given access.