def make_profile_blueprint():
    curr_dir = os.path.abspath(os.path.dirname(__file__))

    blueprint = Blueprint(name="profile", url_prefix="/profile", template_path=os.path.join(curr_dir, "templates"))
    blueprint.add_handlers(
        ".*", [tornado.web.url("/", Profile, name="index"), tornado.web.url("/timezone", Timezone, name="timezone")]
    )
    return blueprint
Exemple #2
0
def make_blueprint():
    """
    Creates the blueprint for the dashboard.
    """
    curr_dir = os.path.abspath(os.path.dirname(__file__))

    blueprint = Blueprint(
        name="dashboard",
        url_prefix="/dashboard",
        template_path=os.path.join(curr_dir, "templates"),
    )
    blueprint.add_handlers(".*", [
        tornado.web.url("/", Index, name="index"),
    ])
    return blueprint
Exemple #3
0
def make_blueprint():
    """
    Creates the blueprint for the settings.
    """
    curr_dir = os.path.abspath(os.path.dirname(__file__))

    blueprint = Blueprint(
        name="settings",
        url_prefix="/settings",
        template_path=os.path.join(curr_dir, "templates"),
    )
    blueprint.add_handlers(".*", [
        tornado.web.url("/", Index, name="index"),
        tornado.web.url("/account", Account, name="account")
    ])
    return blueprint
def make_blueprint():
    """
    Creates the blueprint for the settings.
    """
    curr_dir = os.path.abspath(os.path.dirname(__file__))

    blueprint = Blueprint(name="settings", url_prefix="/settings", template_path=os.path.join(curr_dir, "templates"))
    blueprint.add_handlers(
        ".*", [tornado.web.url("/", Index, name="index"), tornado.web.url("/account", Account, name="account")]
    )

    # add child blueprints in parent initialization
    sub_blueprint = make_profile_blueprint()
    blueprint.register_blueprint(sub_blueprint)

    return blueprint
def make_blueprint():
    """
    Creates the blueprint for the dashboard.
    """
    curr_dir = os.path.abspath(os.path.dirname(__file__))

    blueprint = Blueprint(
        name = "dashboard",
        url_prefix = "/dashboard",
        template_path = os.path.join(curr_dir, "templates"),
    )
    blueprint.add_handlers(
        ".*",
        [
            tornado.web.url("/", Index, name="index"),
        ]
    )
    return blueprint
def make_blueprint():
    """
    Creates the blueprint for the settings.
    """
    curr_dir = os.path.abspath(os.path.dirname(__file__))

    blueprint = Blueprint(
        name = "settings",
        url_prefix = "/settings",
        template_path = os.path.join(curr_dir, "templates"),
    )
    blueprint.add_handlers(
        ".*",
        [
            tornado.web.url("/", Index, name="index"),
            tornado.web.url("/account", Account, name="account")
        ]
    )
    return blueprint