{ "info": { "author": "Ajeet Grewal", "author_email": "asgrewal@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "bottle_flash\n============\n\nThis plugin enables flash messages in bottle. Again, learn by example\n\n::\n\n from bottle import Bottle\n from bottle_flash import FlashPlugin\n\n app = Bottle()\n COOKIE_SECRET = 'super_secret_string'\n app.install(FlashPlugin(secret=COOKIE_SECRET))\n\n app.post('/create_user')\n def create_user():\n # Create the user\n app.flash('Created !')\n\nTo consume the flashed messages, you would do something like the following (jinja2). Here I am assuming that I get the \"app\" in the template context. This can be achieved with the bottle_renderer_ plugin.\n\n::\n\n {% set messages = app.get_flashed_messages() %}\n {% if messages %}\n