diff --git a/ckanext/odsh/plugin.py b/ckanext/odsh/plugin.py index 4ce7a2a46eb9a44c06df382afeb9ebc64eebef66..f7c323f47a9256303822bf853e81a6f58bf8bf4b 100644 --- a/ckanext/odsh/plugin.py +++ b/ckanext/odsh/plugin.py @@ -31,6 +31,7 @@ from ckanext.odsh.views import default from ckanext.odsh.views import package from ckanext.odsh.views import user from ckanext.odsh.views import dashboard +from ckanext.odsh.views import harvest from ckanext.dcat import blueprints as dcat_view log = logging.getLogger(__name__) @@ -95,7 +96,10 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm bp_dashboard.add_url_rule( u'/dashboard/datasets', view_func=dashboard.dashboard_datasets) - return [bp_default, bp_package, bp_user, bp_dashboard] + # + bp_harvest = harvest.blueprint + bp_harvest.add_url_rule(u'/harvest/new', view_func=dashboard.new) + return [bp_default, bp_package, bp_user, bp_dashboard, bp_harvest] # IActions diff --git a/ckanext/odsh/views/harvest.py b/ckanext/odsh/views/harvest.py new file mode 100644 index 0000000000000000000000000000000000000000..832f4eabbfeb103711653e35b9b1c6b141124693 --- /dev/null +++ b/ckanext/odsh/views/harvest.py @@ -0,0 +1,13 @@ +import ckan.plugins.toolkit as toolkit +from flask import Blueprint +from ckan.views.dataset import CreateView +import logging + +log = logging.getLogger(__name__) + +blueprint = Blueprint('odsh_default', __name__) + +def new(): + log.info("views.harvest::new") + return CreateView.as_view(str(u'new')) + #toolkit.abort(404) \ No newline at end of file