-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CKAN 2.10 replace controllers & IRoutes with blueprints #54
Conversation
@@ -23,15 +23,16 @@ | |||
|
|||
import ckan.plugins as plugins | |||
import ckan.plugins.toolkit as toolkit | |||
from . import blueprint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer absolute imports.
plugins.implements(plugins.IConfigurer, inherit=True) | ||
plugins.implements(plugins.ITemplateHelpers, inherit=True) | ||
plugins.implements(plugins.IBlueprint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do some plugins use inherit and others don't? (This is for just my understanding).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the blueprint, we only need custom routes to handle our /about/<>/
urls hence though it was not necessary to extend CKAN core's Blueprints. On the other plugins, we inherit helper functions & configurations such as url_for
, link_for
et.al from CKAN core
Migration of all the controllers to flask views/blueprints. This means changing all BaseController controllers handled by the IRoutes interface to blueprints handled by IBlueprint interface.
IRoutes is deprecates in CKAN < 2.10