Compare commits
6 Commits
cd3e9f81e9
...
8e79c16ef2
Author | SHA1 | Date |
---|---|---|
Alessio Fabrizio | 8e79c16ef2 | |
Alessio Fabrizio | 84d46c2088 | |
Alessio Fabrizio | 9d7464d2be | |
Alessio Fabrizio | c757b8a6c3 | |
Alessio Fabrizio | 1555f32afd | |
Alessio Fabrizio | 5472edd0de |
|
@ -297,7 +297,7 @@ class D4SciencePlugin(plugins.SingletonPlugin):
|
|||
# ITemplateHelpers
|
||||
|
||||
def get_helpers(self):
|
||||
return helpers.get_helpers()
|
||||
return helpers.get_helpers(self)
|
||||
|
||||
# IValidators
|
||||
|
||||
|
|
|
@ -2,17 +2,18 @@
|
|||
#from ckan.controllers.home import HomeController
|
||||
from flask import Blueprint, render_template, g
|
||||
import ckan.plugins as p
|
||||
from ckan.common import OrderedDict, _, g
|
||||
from ckan.common import _, g
|
||||
import ckan.lib.search as search
|
||||
import ckan.model as model
|
||||
import ckan.logic as logic
|
||||
import ckan.lib.helpers as h
|
||||
from collections import OrderedDict
|
||||
|
||||
#blueprint definition
|
||||
d4science_home = Blueprint("d4science_home", __name__)
|
||||
|
||||
#@d4science_home.route("/catalog")
|
||||
@d4science_home.route("/")
|
||||
@d4science_home.route("/d4science_home")
|
||||
def index():
|
||||
try:
|
||||
# package search
|
||||
|
|
|
@ -7,7 +7,8 @@ import ckan.logic as logic
|
|||
import ckan.model as model
|
||||
import ckan.lib.helpers as h
|
||||
import ckan.lib.search as search
|
||||
from ckan.common import OrderedDict, _, NotAuthorized, NotFound
|
||||
from ckan.common import _
|
||||
from collections import OrderedDict
|
||||
|
||||
organization_vre = Blueprint("organization_vre", __name__)
|
||||
|
||||
|
@ -51,7 +52,7 @@ def index():
|
|||
try:
|
||||
logic.check_access('site_read', context)
|
||||
logic.check_access('group_list', context)
|
||||
except NotAuthorized:
|
||||
except logic.NotAuthorized:
|
||||
abort(403, _('Not authorized to see this page'))
|
||||
# pass user info to context as needed to view private datasets of
|
||||
# orgs correctly
|
||||
|
@ -109,7 +110,7 @@ def read(id, limit=20):
|
|||
data_dict['include_datasets'] = False
|
||||
g.group_dict = logic.get_action('group_show')(context, data_dict)
|
||||
g.group = context['group']
|
||||
except (NotFound, NotAuthorized):
|
||||
except (logic.NotFound, logic.NotAuthorized):
|
||||
abort(404, _('Group not found'))
|
||||
|
||||
#read(id, limit, group_type)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import logging
|
||||
import ckan.plugins as p
|
||||
from ckan.common import OrderedDict, _
|
||||
from ckan.common import _
|
||||
import ckan.lib.search as search
|
||||
import ckan.model as model
|
||||
import ckan.logic as logic
|
||||
|
@ -8,10 +8,11 @@ import ckan.lib.helpers as h
|
|||
from flask import Blueprint, render_template, request, g
|
||||
from ckan.lib.search import SearchError
|
||||
from urllib.parse import urlencode
|
||||
from collections import OrderedDict
|
||||
|
||||
d4s_type_blueprint = Blueprint('d4s_type', __name__)
|
||||
|
||||
@d4s_type_blueprint.route('/')
|
||||
@d4s_type_blueprint.route('/d4s_type')
|
||||
def index():
|
||||
try:
|
||||
# package search
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
pytest-ckan
|
||||
webhelpers2==2.1
|
||||
xmltodict
|
||||
pyqrcode
|
||||
collections
|
||||
pyqrcode
|
|
@ -1,4 +1,3 @@
|
|||
webhelpers2==2.1
|
||||
xmltodict
|
||||
pyqrcode
|
||||
collections
|
||||
pyqrcode
|
Loading…
Reference in New Issue