Posts

Showing posts from September, 2015

SQLTap and CKAN

Are you a CKAN developer? Have you had a trip or fall at work involving a slow running sql query that wasn't your fault? Do you terribly miss the django debug toolbar , pyramid debugtoolbar , flask  debugtoolbar or similar? Well you're basically screwed, but to help alleviate the pain I made a tiny ckan extension that integrates the SQLTap middleware with ckan, once you've added 'sqltap' to your list of plugins in your development init you'll find the sqltap interface at http://localhost:5000/__sqltap__ When you run the paster development server. Please don't cry when you see the results there, we'll get round to implementing dogpile caching eventually

Translating ckan extensions using the ITranslations

From ckan 2.5 onwards you will be able to translate the strings in ckan extensions in a much more friendly and easy way. Unless there are any major issues in the code review, this pull request should make your life easier. Previously, there were a few, not ideal solutions (see ckan#959 ) which involved having a paster command or script that would munge all the po/mo files together using gettext's msgcat command. This has the downside that the sysadmin of any ckan instance would have to run this script and whatever other series of texts whenever they had a new ckan extension that they wanted to add. The new pull request allows extension writers to provide a translations that will automatically be included without any additional steps other than the standard step specifying the plugin in the ckan.plugins in the configuration file. To do this you'll need to copy the example plugin and edit your plugin so it looks a bit like ... from ckan.lib.plugins import DefaultTr