-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrade to CKAN 2.11 #2
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
base: master
Are you sure you want to change the base?
Conversation
@ntwalibas - should we add a release tag to the previous version so that projects can continue to easily use the version from before the 2.11 migration |
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.
Wow this is a big change though! Hope it's all been properly tested. A couple of small comments from perusing through, but it's such a large PR it's difficult to check coherence in any meaningful way by review.
import ckan.views.resource as resource | ||
import ckan.plugins.toolkit as tk | ||
import ckan.views.api as api | ||
from ckan.common import g |
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.
Can get this from the toolkit: toolkit.g
context = {"model": model, "session": model.Session, "user": user} | ||
package = toolkit.get_action("package_show")(context, {"id": path_id}) |
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.
It is my understanding that toolkit.get_action
automatically adds the model and session and user to the context. I believe this also means you don't need to import the model.
context = {"model": model, "session": model.Session, "user": user} | |
package = toolkit.get_action("package_show")(context, {"id": path_id}) | |
package = toolkit.get_action("package_show")({}, {"id": path_id}) |
Description
This PR performs a major refactoring and enhancement:
It remains to have the following properly implemented:
Testing
Tests to follow while functionality is being reviewed.
Documentation
The documentation needs to be improved so it is easier to install this extension in new projects.
Checklist