Previous topic

Modules

Next topic

ext module

This Page

app module

Application initialization and app-specific registrations.

There is your main app instance, created by AppFactory.

Note

Note, it’s just a point for blueprints, context processors and extensions binding.

But don’t bind them explicit, as usual. And don’t bind any views to the main app.

Why?

You have at least two apps in your project – one as the basic app and one for testing.

Each of them is created at runtime with some individual settings for database, debug level etc.

And each of them has to have access to any views or extensions with their individual settings.

So dynamical application binding is much more flexible solution.

copyright:(c) 2012 by Roman Semirook.
license:BSD, see LICENSE for more details.
app.app = <Flask 'app'>

The Flask application object

app.css_base = <Bundle output=gen/base.css, filters=[<webassets.filter.cssmin.CSSMin object at 0x4346410>], contents=('css/reset.css', 'css/typo.css', 'css/style.css', 'css/page.css', 'css/forms.css')>

Stylesheet assets bundle

app.js_base = <Bundle output=gen/base.js, filters=[<webassets.filter.jsmin.JSMin object at 0x4346490>], contents=('js/libs/json2.js', 'js/libs/jquery-1.8.2-min.js', 'js/libs/underscore-1.4.2-min.js', 'js/libs/backbone-0.9.2-min.js')>

Javascript assets bundle