Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Flask-ZODB 0.1

    Download button

    No screenshots available
    Downloads: 115  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Dag Odenhall | More programs
    BSD License / FREE
    September 16th, 2011, 05:29 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Flask-ZODB description

    Use the ZODB with Flask

    Flask-ZODB is a Flask extension that provides transparent and scalable persistence of Python objects for Flask applications. Use it as your database or as a complement to another database - for example PostgreSQL where you need to perform rich queries and ZODB where you need structured data and mapping to and from Python types is inconvenient.

    app = Flask(__name__)
    db = ZODB(app)

    @app.before_request
    def set_db_defaults():
     if 'entries' not in db:
     db['entries'] = List()

    @app.route('/')
    def show_entries():
     return render_template('show_entries.html', entries=db['entries'])


    @app.route('/add', methods=['POST'])
    def add_entry():
     db['entries'].append(request.form)
     flash('New entry was successfully posted')
     return redirect(url_for('show_entries'))



    Product's homepage

    Requirements:

    · Python
    · Flask

      


    TAGS:

    Flask extension | Flask ZODB | Python objects | Flask | ZODB | objects

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM