ckan / ckanext-harvest

Remote harvesting extension for CKAN
130 stars 203 forks source link

Replace Pylons routes for build_nav_icon #477

Open frafra opened 2 years ago

frafra commented 2 years ago

Fix #476

I am not sure why admin and about require harvester. as prefix instead of the variable dataset_type, but it seems to work for me.

This PR does not replace all the Pylons routes: there are still a lot of deprecation warnings. This is just the bare minimum to make ckanext-harvest work with the current CKAN. I also prefer to send small fixes as they can be more easily reviewed instead of trying to replace all the routes at once.

Zharktas commented 2 years ago

This requires conditionals, as the extension still needs to work on older ckan versions. Thats why tests are failing.

frafra commented 2 years ago

Any suggestion/example on how to handle these conditionals properly?

tino097 commented 2 years ago

@frafra maybe you can use the

 if h.ckan_version() > '2.9' 

in the templates to use the newer routes