コード例 #1
0
# -*- coding: utf-8 -*-
"""
flask_via.examples.blueprints.foo.routes
========================================

A blueprint ``Flask-Via`` example Flask application.
"""

from flask_via.examples.blueprints.foo import views
from flask.ext.via.routers import default

routes = [
    default.Functional('/baz', views.baz),
]
コード例 #2
0
# -*- coding: utf-8 -*-
"""
flask_via.examples.small.routes
===============================

A small ``Flask-Via`` example Flask application.
"""

from flask_via.examples.small import views
from flask.ext.via.routers import default, Include

routes = [
    default.Functional('/', views.home),
    default.Functional('/about', views.about),
    default.Functional('/contact', views.contact),
    # Include other routes from other modules
    Include('flask_via.examples.small.foo.routes', url_prefix='/foo')
]
コード例 #3
0
ファイル: routes.py プロジェクト: tonysugent/spotify_site
from . import views
from flask.ext.via.routers import default, Include

routes = [
    default.Functional('/', views.home),
    default.Functional('/top_played+<accesstoken>', views.top_played),
    default.Functional('/callback/q', views.callback)
]
コード例 #4
0
# -*- coding: utf-8 -*-
"""
flask_via.examples.small.foo.routes
===================================

A small ``Flask-Via`` example Flask application.
"""

from flask_via.examples.small.foo import views
from flask.ext.via.routers import default, Include

routes = [
    default.Functional('/foo', views.foo),
    Include('flask_via.examples.small.foo.routes',
            routes_name='urls',
            url_prefix='/bar')
]

urls = [
    default.Functional('/bar', views.foo),
]