maxcountryman/flask-login — pull request #164 by dankeder (2014-06-17 19:14:08+00:00)
Title: Support for per-blueprint login views

Add a new attribute `blueprint_login_views` to LoginManager to support
per-blueprint login views.

If the app is using blueprints we find the login view for the current blueprint
using `blueprint_login_views`. Note that the blueprint login view can be set to
None as well (in that case the default 401 handler kicks in). If the blueprint
is not specified in `blueprint_login_views` at all we will use the value of
`login_view`.

If the app is not using blueprints everything works as before.

Example usage:

login_manager = LoginManager()
login_manager.blueprint_login_views = {
'api': None,
'ui': 'webui.login'
}