46 # output.append({"name": sc["code"],"keywords": [ sc["label"] ], "color" : sc["color"] }) |
46 # output.append({"name": sc["code"],"keywords": [ sc["label"] ], "color" : sc["color"] }) |
47 #else: |
47 #else: |
48 output.append({"name": c["code"] if "code" in c else "","keywords": [ c["label"] ], "color" : c["color"] }) |
48 output.append({"name": c["code"] if "code" in c else "","keywords": [ c["label"] ], "color" : c["color"] }) |
49 |
49 |
50 base_url = getattr(config,'LDT_PLATFORM_BASE_URL','') + "/ldt/embediframe/?" |
50 base_url = getattr(config,'LDT_PLATFORM_BASE_URL','') + "/ldt/embediframe/?" |
51 url_query_params = {'project_id': model.project_id, |
51 url_query_params = {'project_id': model.project_id, |
52 'polemic': 'all', |
52 'polemic': 'all', |
53 'polemic__max_elements': 200, |
53 'polemic__max_elements': 200, |
54 'createannotation': True, |
54 'createannotation': True, |
55 'createannotation_polemics': False, |
55 'createannotation_polemics': False, |
56 'tag_titles': "", |
56 'tag_titles': "", |
57 'polemics_list': json.dumps(output, separators=(',',':'))} |
57 'polemics_list': json.dumps(output, separators=(',',':'))} |
58 |
58 |
85 class EventView(ModelView): |
85 class EventView(ModelView): |
86 column_searchable_list = ('code', 'label') |
86 column_searchable_list = ('code', 'label') |
87 column_list = ('code', 'label', 'start_date', 'active') |
87 column_list = ('code', 'label', 'start_date', 'active') |
88 column_filters = ('code', 'label', 'start_date', 'active') |
88 column_filters = ('code', 'label', 'start_date', 'active') |
89 form_create_rules = ('code', 'label', 'description', 'start_date') |
89 form_create_rules = ('code', 'label', 'description', 'start_date') |
90 inline_models = [(models.EventSession, {'form_overrides': { "start_ts": StartTSField, },}})] |
90 inline_models = [(models.EventSession, {'form_overrides': { "start_ts": StartTSField, },})] |
91 |
91 |
92 def __init__(self, session, **kwargs): |
92 def __init__(self, session, **kwargs): |
93 super(EventView, self).__init__(models.Event, session, **kwargs) |
93 super(EventView, self).__init__(models.Event, session, **kwargs) |
94 |
94 |
95 |
95 |