I'm using CKAN to develop an open data portal. It uses Python as the language and Pylons as the framework
I use the below code snippets the get the API link as mentioned in the question. Please refer this question for more info. But it does not work for me.
Method 1
<b>API: </b><a href="${h.url_for(controller='api', register='package', action='show', id=c.pkg.name, ver='2')}">
${h.url_for(controller='api', register='package', action='show', id=c.pkg.name, ver='2')}
</a>
Method 2
<b>API: </b><a href="{% h.url_for(controller='api', register='package', action='show', id=c.pkg.name, ver='2') %}">
{% h.url_for(controller='api', register='package', action='show', id=c.pkg.name, ver='2') %}
</a>
Both above throw 500 error as shown below in the images.
How could I fix this error?
Above code works fine for me.