Exemplo n.º 1
0
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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 4
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")]
    )

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

    return blueprint
Exemplo n.º 5
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
Exemplo n.º 6
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