Compare commits
No commits in common. "8e79c16ef2b0e1381c15842af354def20d55392f" and "cd3e9f81e9b68b442bff429f73fdf02190e5d1fb" have entirely different histories.
8e79c16ef2
...
cd3e9f81e9
|
@ -297,7 +297,7 @@ class D4SciencePlugin(plugins.SingletonPlugin):
|
|||
# ITemplateHelpers
|
||||
|
||||
def get_helpers(self):
|
||||
return helpers.get_helpers(self)
|
||||
return helpers.get_helpers()
|
||||
|
||||
# IValidators
|
||||
|
||||
|
|
|
@ -2,18 +2,17 @@
|
|||
#from ckan.controllers.home import HomeController
|
||||
from flask import Blueprint, render_template, g
|
||||
import ckan.plugins as p
|
||||
from ckan.common import _, g
|
||||
from ckan.common import OrderedDict, _, 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")
|
||||
@d4science_home.route("/")
|
||||
def index():
|
||||
try:
|
||||
# package search
|
||||
|
|
|
@ -7,8 +7,7 @@ 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 _
|
||||
from collections import OrderedDict
|
||||
from ckan.common import OrderedDict, _, NotAuthorized, NotFound
|
||||
|
||||
organization_vre = Blueprint("organization_vre", __name__)
|
||||
|
||||
|
@ -52,7 +51,7 @@ def index():
|
|||
try:
|
||||
logic.check_access('site_read', context)
|
||||
logic.check_access('group_list', context)
|
||||
except logic.NotAuthorized:
|
||||
except NotAuthorized:
|
||||
abort(403, _('Not authorized to see this page'))
|
||||
# pass user info to context as needed to view private datasets of
|
||||
# orgs correctly
|
||||
|
@ -110,7 +109,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 (logic.NotFound, logic.NotAuthorized):
|
||||
except (NotFound, 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 _
|
||||
from ckan.common import OrderedDict, _
|
||||
import ckan.lib.search as search
|
||||
import ckan.model as model
|
||||
import ckan.logic as logic
|
||||
|
@ -8,11 +8,10 @@ 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')
|
||||
@d4s_type_blueprint.route('/')
|
||||
def index():
|
||||
try:
|
||||
# package search
|
||||
|
|
|
@ -2,3 +2,4 @@ pytest-ckan
|
|||
webhelpers2==2.1
|
||||
xmltodict
|
||||
pyqrcode
|
||||
collections
|
|
@ -1,3 +1,4 @@
|
|||
webhelpers2==2.1
|
||||
xmltodict
|
||||
pyqrcode
|
||||
collections
|
Loading…
Reference in New Issue