app/views.py
def requires_auth(f):
    """Decorator function for sign-in hook"""
    @wraps(f)
    def decorated(*args, **kwargs):
        
        if 'profile' not in session:
            # Redirect to Login page
            return redirect('/')
        return f(*args, **kwargs)

    return decorated
Decorator function for sign-in hook
Decorator function for sign-in hook
Decorator function for sign - in hook
def requires_auth(f):
    @wraps(f)
    def decorated(*args, **kwargs):
        if 'profile' not in session:
            return redirect('/')
        return f(*args, **kwargs)
    return decorated
def requires_auth ( f ) : @ wraps ( f ) def decorated ( * args , ** kwargs ) : if 'profile' not in session : return redirect ( '/' ) return f ( * args , ** kwargs ) return decorated
Decorator function for sign-in hook
Decorator function for sign - in hook
"""Decorator function for sign-in hook""" # Redirect to Login page
f