get_top_packages is broken, and needs to be rewritten to work with
CKAN 2.*. This is because ckan.authz has been removed in CKAN 2.*
See commit ffa86c010d
This reverts commit 0febe11dc5, reversing
changes made to e45d73d7a3.
This has been reverted for caushing Apache to max out threads when running
under mod_wsgi.
config is no longer available to templates (changed in CKAN core), use g
instead.
This means I have to rename googleanalytics.resource_prefix to
googleanalytics_resource_prefix, because it's now an attribute and can't
have a . in it.
Should probably be using g rather than config to access the setting in
the Python code as well..
It has been removed in CKAN 2.0, trying to import it makes CKAN crash on
startup.
This means that get_top_packages() is broken, and needs to be rewritten
to work with CKAN 2.0. At least by removing the import the plugin can
be loaded and its other functions used but if you try to use
get_top_packages() it will crash.
1. Specified `resource_prefix` and `resource_url` context more tightly (could be global context)
2. Changed `this.href` to `jQuery(this).prop('href')` as it will never throw a syntax error when upon the condition of a `a.resource-url-analytics` not having a `href` attribute
3. Also added check so that if no `href` is present it doesn't send a blank link to google analytics
Since version 2 of the Google Analytics API was shelved the download
of previous data was broken. This commit should, once the oauth dance
has been complete, allow it to work again by changing all of the calls.
See the README for instructions on setting up OAUTH. Other bug fixes
are:
- Resources views are now clearly identified
- Package Ids are set for /dataset/edit requests
- Updated README
I'm not going to finish implementing Google Analytics Event Tracking
support for CKAN 2.0 at this point, it can be implemented later if
needed (event tracking with CKAN 1.x should still work).
Everything should still work as it did with CKAN 1.x templates _if_
ckan.legacy_templates is set in your ini file.
The event tracking javascript (ckanext-googleanalytics.js) still needs
to be updated for CKAN 2.0.
Also there is some code in plugin.py:filter() that adds something to the
package and group pages that I haven't implemented for CKAN 2.0 yet.
Tests need to be updated.
README needs to be updated.
Follow CKAN coding standards: don't use from foo import bar, but
standard library imports before all other imports and ckan imports after
all other imports.