Commit 5eae7cfe authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update report_dataframe to add get_people_per_year, get_peoplelike_items, etc.

parent 307c0484
......@@ -19,8 +19,15 @@ from model_selector import Selector
from report_dataframes import (db2df,
debug_df,
get_items,
get_items_per_year,
get_items_small,
get_items_per_year_small,
get_items_small_per_year,
get_objectlike_items,
get_objectlike_items_per_year,
get_peoplelike_items,
get_peoplelike_items_per_year,
get_people_per_year,
normalize_history_data,
query_history,
Timer)
......
......@@ -4,7 +4,15 @@
"""
from gluon.storage import Storage
from gluon.tools import PluginManager
from report_dataframes import (get_items,
get_items_per_year,
get_items_small,
get_items_small_per_year,
get_objectlike_items,
get_objectlike_items_per_year,
get_peoplelike_items,
get_peoplelike_items_per_year,
get_people_per_year)
class Event(object):
"""Initialise the plugin event.
......@@ -50,3 +58,18 @@ class Event(object):
event.sources = Storage()
event.sources[name] = Storage(func=func)
@staticmethod
def register_sources():
"""Register all sources defined in plugin_event.
"""
Event.register_source("items",get_items)
Event.register_source("items per year",get_items_per_year)
Event.register_source("items small",get_items_small)
Event.register_source("items small per year",get_items_small_per_year)
Event.register_source("object like",get_objectlike_items)
Event.register_source("object like per year",get_objectlike_items_per_year)
Event.register_source("people like",get_peoplelike_items)
Event.register_source("people like per year",get_peoplelike_items_per_year)
Event.register_source("people per year",get_people_per_year)
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment