flirror/__init__.py
def create_web(
    config: Optional[Dict] = None, jinja_options: Optional[Any] = None
) -> Flirror:
    """
    Load the configuration file and initialize the flirror app with basic
    components plus everything that's necessary for the web app like jinja2
    env, template filters and assets (SCSS/CSS).
    """

    app = create_app(config, jinja_options)

    # The central index page showing all tiles
    IndexView.register_url(app)

    # Register error handler to known status codes
    error_handler = make_error_handler()
    app.register_error_handler(400, error_handler)
    app.register_error_handler(403, error_handler)
    app.register_error_handler(404, error_handler)

    # Add custom Jinja2 template filters
    app.add_template_filter(prettydate)
    app.add_template_filter(format_time)
    app.add_template_filter(clean_string)

    # Initialize webassets to work with SCSS files
    assets = Environment(app)
    scss = Bundle("scss/all.scss", filters="pyscss", output="all.css")
    assets.register("scss_all", scss)

    return app

    Load the configuration file and initialize the flirror app with basic
    components plus everything that's necessary for the web app like jinja2
    env, template filters and assets (SCSS/CSS).
    
Load the configuration file and initialize the flirror app with basic
components plus everything that's necessary for the web app like jinja2
env, template filters and assets (SCSS/CSS).
Load the configuration file and initialize the flirror app with basic components plus everything that ' s necessary for the web app like jinja2 env template filters and assets ( SCSS / CSS ) .
def create_web(
    config: Optional[Dict] = None, jinja_options: Optional[Any] = None
) -> Flirror:
    app = create_app(config, jinja_options)
    IndexView.register_url(app)
    error_handler = make_error_handler()
    app.register_error_handler(400, error_handler)
    app.register_error_handler(403, error_handler)
    app.register_error_handler(404, error_handler)
    app.add_template_filter(prettydate)
    app.add_template_filter(format_time)
    app.add_template_filter(clean_string)
    assets = Environment(app)
    scss = Bundle("scss/all.scss", filters="pyscss", output="all.css")
    assets.register("scss_all", scss)
    return app
def create_web ( config : Optional [ Dict ] = None , jinja_options : Optional [ Any ] = None ) -> Flirror : app = create_app ( config , jinja_options ) IndexView . register_url ( app ) error_handler = make_error_handler ( ) app . register_error_handler ( 400 , error_handler ) app . register_error_handler ( 403 , error_handler ) app . register_error_handler ( 404 , error_handler ) app . add_template_filter ( prettydate ) app . add_template_filter ( format_time ) app . add_template_filter ( clean_string ) assets = Environment ( app ) scss = Bundle ( "scss/all.scss" , filters = "pyscss" , output = "all.css" ) assets . register ( "scss_all" , scss ) return app
Load the configuration file and initialize the flirror app with basic
components plus everything that's necessary for the web app like jinja2
env, template filters and assets (SCSS/CSS).
Load the configuration file and initialize the flirror app with basic components plus everything that ' s necessary for the web app like jinja2 env template filters and assets ( SCSS / CSS ) .
"""
    Load the configuration file and initialize the flirror app with basic
    components plus everything that's necessary for the web app like jinja2
    env, template filters and assets (SCSS/CSS).
    """ # The central index page showing all tiles # Register error handler to known status codes # Add custom Jinja2 template filters # Initialize webassets to work with SCSS files
config
Optional[Dict]
jinja_options
Optional[Any]