wip
This commit is contained in:
parent
6c4ed8b0da
commit
fabd6894e1
|
@ -2,6 +2,7 @@
|
|||
PREFIX := ~/envs/publik-env-py3/bin/
|
||||
|
||||
WCS_MANAGE := $(PREFIX)wcs-manage
|
||||
CHRONO_MANAGE := $(PREFIX)chrono-manage
|
||||
|
||||
prod:
|
||||
make WCS_MANAGE='sudo -u wcs /usr/bin/wcs-manage' all
|
||||
|
@ -11,5 +12,8 @@ all: wcs
|
|||
wcs:
|
||||
@$(WCS_MANAGE) runscript --all-tenants wcs-crawl.py
|
||||
|
||||
chrono:
|
||||
@$(CHRONO_MANAGE) tenant_command runscript --all-tenants chrono-crawl.py
|
||||
|
||||
install:
|
||||
sudo apt install python3-pandas python3-ipdb
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
import collections
|
||||
import pprint
|
||||
|
||||
import pandas as pd
|
||||
from chrono.agendas.models import Agenda, Event
|
||||
from django.db import connection
|
||||
|
||||
print(connection.tenant.domain_url)
|
||||
|
||||
agendas = collections.OrderedDict()
|
||||
|
||||
for agenda in Agenda.objects.filter(kind='event').order_by('label').prefetch_related('events'):
|
||||
agendas[agenda.label] = pd.DataFrame(agenda.events.values_list('start_datetime', flat=True))
|
||||
|
||||
pprint.pprint(agendas)
|
Loading…
Reference in New Issue