Flask Snippets

Snippets are unofficial and unmaintained.

This is an archived view of user-submitted snippets. Despite being hosted on the Flask site, they are not official. No Flask maintainer has curated or checked the snippets for security, correctness, or design.

Flask Set Cookies by Response

Posted by liuliang on 2010-06-28 @ 15:03 and filed in Utilities

def cookie_insertion():
    redirect_to_index = redirect('/index')
    response = current_app.make_response(redirect_to_index )  
    return response

This snippet by liuliang can be used freely for anything you like. Consider it public domain.