[ckan-changes] commit/ckan: amercader: [old forms] #1301 Give access to extensions to the old formalchemy controllers
Bitbucket
commits-noreply at bitbucket.org
Thu Sep 1 14:39:01 UTC 2011
1 new changeset in ckan:
http://bitbucket.org/okfn/ckan/changeset/efdf52a5368d/
changeset: efdf52a5368d
user: amercader
date: 2011-09-01 15:21:46
summary: [old forms] #1301 Give access to extensions to the old formalchemy controllers
affected #: 3 files (510 bytes)
--- a/ckan/controllers/group_formalchemy.py Thu Sep 01 12:28:48 2011 +0100
+++ b/ckan/controllers/group_formalchemy.py Thu Sep 01 14:21:46 2011 +0100
@@ -16,10 +16,15 @@
from ckan.lib.base import ValidationException
from ckan.controllers.group import GroupController
+from ckan.plugins import PluginImplementations, IGroupController
+
log = logging.getLogger(__name__)
class GroupFormalchemyController(GroupController):
+ def __init__(self):
+ self.extensions = PluginImplementations(IGroupController)
+
def new(self):
record = model.Group
c.error = ''
--- a/ckan/controllers/package.py Thu Sep 01 12:28:48 2011 +0100
+++ b/ckan/controllers/package.py Thu Sep 01 14:21:46 2011 +0100
@@ -23,7 +23,6 @@
from ckan.lib.navl.dictization_functions import DataError, unflatten, validate
from ckan.logic import NotFound, NotAuthorized, ValidationError
from ckan.logic import tuplize_dict, clean_dict, parse_params, flatten_to_string_key
-from ckan.plugins import PluginImplementations, IPackageController
from ckan.lib.dictization import table_dictize
import ckan.forms
import ckan.authz
@@ -97,7 +96,6 @@
## end hooks
authorizer = ckan.authz.Authorizer()
- extensions = PluginImplementations(IPackageController)
def search(self):
try:
@@ -253,9 +251,6 @@
# used by disqus plugin
c.current_package_id = c.pkg.id
- for item in self.extensions:
- item.read(c.pkg)
-
#render the package
PackageSaver().render_package(c.pkg_dict)
return render('package/comments.html')
--- a/ckan/controllers/package_formalchemy.py Thu Sep 01 12:28:48 2011 +0100
+++ b/ckan/controllers/package_formalchemy.py Thu Sep 01 14:21:46 2011 +0100
@@ -9,11 +9,15 @@
from pylons.i18n import get_lang, _
from ckan.logic import check_access, NotAuthorized
+from ckan.plugins import PluginImplementations, IPackageController
log = logging.getLogger(__name__)
class PackageFormalchemyController(PackageController):
+ def __init__(self):
+ self.extensions = PluginImplementations(IPackageController)
+
def new(self):
c.error = ''
api_url = config.get('ckan.api_url', '/').rstrip('/')
Repository URL: https://bitbucket.org/okfn/ckan/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the ckan-changes
mailing list