Skip to content

Commit

Permalink
Merge pull request #19 from barakalon/barakalon/configurable-blueprin…
Browse files Browse the repository at this point in the history
…t-name

Make the name of the Blueprint configurable
  • Loading branch information
sveint committed Aug 10, 2018
2 parents 2a9b9c9 + d67d1f1 commit b396f61
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,6 @@ ENV/
.ropeproject

!flask_swagger_ui/dist/

# PyCharm
.idea/
12 changes: 9 additions & 3 deletions flask_swagger_ui/flask_swagger_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@
from flask import Blueprint, send_from_directory, render_template, request


def get_swaggerui_blueprint(base_url, api_url, config=None, oauth_config=None):

swagger_ui = Blueprint('swagger_ui',
def get_swaggerui_blueprint(
base_url,
api_url,
config=None,
oauth_config=None,
blueprint_name='swagger_ui'
):

swagger_ui = Blueprint(blueprint_name,
__name__,
static_folder='dist',
template_folder='templates')
Expand Down

0 comments on commit b396f61

Please sign in to comment.