Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ckanext-odsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open-Data
ckanext-odsh
Commits
f977025b
Commit
f977025b
authored
2 years ago
by
Thorge Petersen
Browse files
Options
Downloads
Patches
Plain Diff
Removed OdshGroupController
parent
fc02e1d2
No related branches found
No related tags found
2 merge requests
!41
Version 2.0.0
,
!38
Merge py3 into dev
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ckanext/odsh/controller.py
+0
-46
0 additions, 46 deletions
ckanext/odsh/controller.py
ckanext/odsh/plugin.py
+0
-3
0 additions, 3 deletions
ckanext/odsh/plugin.py
with
0 additions
and
49 deletions
ckanext/odsh/controller.py
+
0
−
46
View file @
f977025b
...
...
@@ -28,52 +28,6 @@ render = base.render
get_action
=
logic
.
get_action
class
OdshGroupController
(
OrganizationController
):
def
_action
(
self
,
name
):
action
=
super
(
OdshGroupController
,
self
).
_action
(
name
)
def
custom_org_list
(
context
,
data_dict
):
sort_desc
=
data_dict
[
'
sort
'
]
==
'
name desc
'
d
=
data_dict
.
copy
()
if
'
offset
'
in
d
:
del
d
[
'
offset
'
]
del
d
[
'
limit
'
]
# print(data_dict)
if
d
[
"
type
"
]
!=
'
organization
'
:
return
action
(
context
,
d
)
all
=
d
[
'
all_fields
'
]
query
=
d
[
'
q
'
]
result
=
action
(
context
,
d
)
seen
=
set
([(
r
[
'
id
'
]
if
all
else
r
)
for
r
in
result
])
for
q
in
query
.
split
(
'
'
):
d
[
'
q
'
]
=
q
ret
=
action
(
context
,
d
)
for
r
in
ret
:
id
=
r
[
'
id
'
]
if
all
else
r
if
id
not
in
seen
:
result
.
append
(
r
)
seen
.
add
(
id
)
if
all
:
result
=
sorted
(
result
,
key
=
lambda
k
:
k
[
'
name
'
],
reverse
=
sort_desc
)
else
:
result
=
sorted
(
result
,
reverse
=
sort_desc
)
if
'
offset
'
in
data_dict
:
off
=
data_dict
[
'
offset
'
]
limit
=
data_dict
[
'
limit
'
]
return
result
[
off
:
off
+
limit
]
return
result
if
name
==
'
group_list
'
:
return
custom_org_list
else
:
return
super
(
OdshGroupController
,
self
).
_action
(
name
)
class
OdshApiController
(
ApiController
):
def
action
(
self
,
logic_function
,
ver
=
None
):
if
toolkit
.
asbool
(
config
.
get
(
'
ckanext.odsh.log_api_requests
'
,
'
false
'
)):
...
...
This diff is collapsed.
Click to expand it.
ckanext/odsh/plugin.py
+
0
−
3
View file @
f977025b
...
...
@@ -308,9 +308,6 @@ class OdshPlugin(plugins.SingletonPlugin, DefaultTranslation, DefaultDatasetForm
with
SubMapper
(
map
,
controller
=
'
ckanext.odsh.controller:OdshFeedController
'
)
as
m
:
m
.
connect
(
'
/feeds/custom.atom
'
,
action
=
'
custom
'
)
with
SubMapper
(
map
,
controller
=
'
ckanext.odsh.controller:OdshGroupController
'
)
as
m
:
m
.
connect
(
'
organizations_index
'
,
'
/organization
'
,
action
=
'
index
'
)
# redirect all user routes to custom controller
# with SubMapper(map, controller='ckanext.odsh.controller:OdshUserController') as m:
# m.connect('/user/edit', action='edit')
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment