defnull/bottle — Issue #295: Multiple plugins can't inject parameters
Author: hitezh
Created: 2012-03-06 22:20:18+00:00
State: open

Hi,

I am trying to write a plugin which injects some data into the the functions, but it failes if I already have another plugin (say sqlite).

A simple example is the code below:

``` python
from bottle import *
import bottle
from bottle.ext import sqlite

app = bottle.Bottle()
test_db = sqlite.Plugin(dbfile='test.db')
cache_db = sqlite.Plugin(dbfile=':memory:', keyword='cache')
app.install(test_db)
app.install(cache_db)

@route('/')
def show(db, cache):
return "successfully loaded both plugins"

if __name__ == "__main__":
bottle.debug(True)
run(reloader=True)
```

when run, it throws this error : `TypeError: show() takes exactly 2 arguments (0 given)`