Closed hmarrao closed 10 years ago
You can use the apply keyword:
@sme_auth_app.route('/', apply=[login()])
def home(auth):
user = auth.get_user(request.environ)
that's the working usage that Im using also but still it is a bug in the code package no¿?
i install via git:
pip install -e git+https://github.com/Avelino/bottle-auth.git#egg=bottle-auth
Fixed in #8
The decorator login isn't working as a decorator:
couldn't get this to work:
@sme_auth_app.route('/') @login(auth) def home(auth):
but
@sme_auth_app.route('/')
@login()
def home(auth): user = auth.get_user(request.environ)
works fine.