def login_required(function=None, redirect_field_name=REDIRECT_FIELD_NAME,<EOL>login_url=None):
actual_decorator = request_passes_test(<EOL>lambda r: r.session.get('<STR_LIT>'),<EOL>login_url=login_url,<EOL>redirect_field_name=redirect_field_name<EOL>)<EOL>if function:<EOL><INDENT>return actual_decorator(function)<EOL><DEDENT>return actual_decorator<EOL>
Decorator for views that checks that the user is logged in, redirecting
to the log-in page if necessary.