-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from thisissoon/feature/include-endpoint
Feature/include endpoint
- Loading branch information
Showing
28 changed files
with
464 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ | |
pytest==2.5.2 | ||
pytest-cov==1.6 | ||
pytest_spec==0.2.17 | ||
|
||
Flask-Testing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Baz View in Blueprint |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
flask_via.examples.include.app | ||
============================== | ||
A include ``Flask-Via`` example Flask application. | ||
""" | ||
|
||
from flask import Flask | ||
from flask.ext.via import Via | ||
|
||
app = Flask(__name__) | ||
app.config['VIA_ROUTES_MODULE'] = 'flask_via.examples.include.routes' | ||
|
||
via = Via() | ||
via.init_app(app) | ||
|
||
if __name__ == '__main__': | ||
app.run(debug=True) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
flask_via.examples.include.foo.routes | ||
===================================== | ||
A include ``Flask-Via`` example Flask application. | ||
""" | ||
|
||
from flask_via.examples.include.bar.views import FooView, FazView, flop | ||
from flask.ext.via.routers.default import Basic, Pluggable | ||
|
||
routes = [ | ||
Pluggable('/foo', FooView, 'foo'), | ||
Pluggable('/faz', FazView, 'faz'), | ||
Basic('/flop', flop), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
flask_via.examples.include.bar.views | ||
==================================== | ||
A include ``Flask-Via`` example Flask application. | ||
""" | ||
|
||
from flask import request | ||
from flask.views import MethodView | ||
|
||
|
||
class FooView(MethodView): | ||
|
||
def get(self): | ||
return '{0.path} - {0.endpoint}'.format(request) | ||
|
||
|
||
class FazView(MethodView): | ||
|
||
def get(self): | ||
return '{0.path} - {0.endpoint}'.format(request) | ||
|
||
|
||
def flop(): | ||
return '{0.path} - {0.endpoint}'.format(request) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
flask_via.examples.include.foo.routes | ||
===================================== | ||
A include ``Flask-Via`` example Flask application. | ||
""" | ||
|
||
from flask_via.examples.include.foo.views import BarView, BazView | ||
from flask.ext.via.routers import Include | ||
from flask.ext.via.routers.default import Pluggable | ||
|
||
routes = [ | ||
Pluggable('/bar', BarView, 'bar'), | ||
Pluggable('/baz', BazView, 'baz'), | ||
Include( | ||
'flask_via.examples.include.bar.routes', | ||
url_prefix='/bar', | ||
endpoint='bar') | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
flask_via.examples.include.foo.views | ||
==================================== | ||
A include ``Flask-Via`` example Flask application. | ||
""" | ||
|
||
from flask import request | ||
from flask.views import MethodView | ||
|
||
|
||
class BarView(MethodView): | ||
|
||
def get(self): | ||
return '{0.path} - {0.endpoint}'.format(request) | ||
|
||
|
||
class BazView(MethodView): | ||
|
||
def get(self): | ||
return '{0.path} - {0.endpoint}'.format(request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
flask_via.examples.include.routes | ||
================================= | ||
A include ``Flask-Via`` example Flask application. | ||
""" | ||
|
||
from flask.ext.via.routers import Include | ||
|
||
routes = [ | ||
Include( | ||
'flask_via.examples.include.foo.routes', | ||
url_prefix='/foo', | ||
endpoint='foo') | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.