Skip to content

Commit

Permalink
Neaten up example IBlueprint plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
brew committed Jun 3, 2016
1 parent c759133 commit 80a83c3
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions ckan/tests/config/test_middleware.py
Expand Up @@ -437,13 +437,9 @@ def after_map(self, _map):
def get_blueprint(self):
# Create Blueprint for plugin
blueprint = Blueprint(self.name, self.__module__)
blueprint.template_folder = 'templates'
# Add plugin url rules to Blueprint object
rules = [
('/pylons_and_flask', 'flask_plugin_view', flask_plugin_view),
]
for rule in rules:
blueprint.add_url_rule(*rule)
# Add plugin url rule to Blueprint object
blueprint.add_url_rule('/pylons_and_flask', 'flask_plugin_view',
flask_plugin_view)

return blueprint

Expand Down

0 comments on commit 80a83c3

Please sign in to comment.