Skip to content

jlmadurga/bottle-mongoengine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bottle-MongoEngine

This plugin integrates mongoengine with your Bottle application. It connects mongoengine to mongo databases and injects that connection to your route.

Using example:

import bottle
from bottle.ext import mongoengine

app = bottle.Bottle()
plugin = mongoengine.Plugin(db='name',alias='first_db')
app.install(plugin)

@app.route('/show/:item')
def show(item, db):
    item = Item.objects(id=item)
    if item:
        return template('showitem', item=item)
    return HTTPError(404, "Page not found")

About

Bottle plugin to integrate mongoengine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published