Skip to content
Snippets Groups Projects
Commit 8955cd77 authored by Thorge Petersen's avatar Thorge Petersen
Browse files

Testing harvest route interception

parent 4290868d
Branches
Tags
2 merge requests!41Version 2.0.0,!38Merge py3 into dev
......@@ -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
......
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment