Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Simple support Blueprint modular application, fix #2

  • Loading branch information...
commit b7433104c5b8b4fab44a50d1e38807183edb0f37 1 parent f27f565
@nycholas nycholas authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 flask_jsonrpc/__init__.py
View
8 flask_jsonrpc/__init__.py
@@ -149,11 +149,15 @@ def __init__(self, app=None, service_url='/api', site=default_site):
self.init_app(self.app)
else:
self.app = None
-
+
def init_app(self, app):
app.add_url_rule(self.service_url, '', _site_api, methods=['POST'])
app.add_url_rule(self.service_url + '/<method>', '', _site_api, methods=['GET'])
-
+
+ def register_blueprint(self, blueprint):
+ blueprint.add_url_rule(self.service_url, '', _site_api, methods=['POST'])
+ blueprint.add_url_rule(self.service_url + '/<method>', '', _site_api, methods=['GET'])
+
def method(self, name, authenticated=False, safe=False, validate=False, **options):
def decorator(f):
arg_names = getargspec(f)[0][1:]
Please sign in to comment.
Something went wrong with that request. Please try again.