ckanext-googleanalytics_v2..../ckanext/googleanalytics/plugin/flask_plugin.py

27 lines
547 B
Python
Raw Normal View History

2019-11-22 15:59:22 +01:00
# -*- coding: utf-8 -*-
2019-11-22 16:02:26 +01:00
from future import standard_library
2019-11-22 17:08:02 +01:00
2019-11-22 16:02:26 +01:00
standard_library.install_aliases()
import queue
2019-11-22 15:59:22 +01:00
import ckan.plugins as plugins
from ckanext.googleanalytics.views import ga
2019-12-13 15:44:52 +01:00
from ckanext.googleanalytics.cli import get_commands
2019-11-22 15:59:22 +01:00
class GAMixinPlugin(plugins.SingletonPlugin):
plugins.implements(plugins.IBlueprint)
2019-12-13 15:44:52 +01:00
plugins.implements(plugins.IClick)
2019-11-22 15:59:22 +01:00
2019-11-22 16:02:26 +01:00
analytics_queue = queue.Queue()
2019-11-22 15:59:22 +01:00
2019-11-22 17:08:02 +01:00
# IBlueprint
2019-11-22 15:59:22 +01:00
def get_blueprint(self):
return [ga]
2019-12-13 15:44:52 +01:00
# IClick
def get_commands(self):
return get_commands()