I am making my first decorator and I want to make sure I do it right...
def is_in_conference():
    if not session.current_conference:
        redirect(URL('default', 'index'))

@is_in_conference()
def index():
    """
INFO: This page takes all the various things of the conference on to one page.
    """
    return dict()

Is this correct?
Also can I use two docorators?
For example:

@is_in_conference()
@auth.is_logged_in()
def index():
    """
INFO: This page takes all the various things of the conference on to one page.
    """
    return dict()
Best Regards,
Jason

Reply via email to