Skip to content

Commit

Permalink
Fixed the tracks schema
Browse files Browse the repository at this point in the history
Signed-off-by: Toomore Chiang <[email protected]>
  • Loading branch information
toomore committed Jul 31, 2024
1 parent ebbf64e commit a844f80
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 19 deletions.
16 changes: 13 additions & 3 deletions module/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,28 @@
from typing import Any

from toldwords.pretalx import Pretalx, Submission, Talk
from toldwords.utils import DATA2023

import setting
from models.trackdb import TalkFavsDB, TrackDB

PRETALX_SETTING = {
'2023': {
'domain': 'pretalx.coscup.org',
'event': 'coscup-2023',
},
'2024': {
'domain': 'pretalx.coscup.org',
'event': 'coscup-2024',
}
}


class Track:
''' Track '''

def __init__(self, pid: str) -> None:
DATA2023['token'] = setting.PRETALX_API_KEY
self.pretalx = Pretalx(**DATA2023)
PRETALX_SETTING[pid]['token'] = setting.PRETALX_API_KEY[pid]
self.pretalx = Pretalx(**PRETALX_SETTING[pid])
self.submissions: list[Submission]
self.talks: list[Talk]
self.pid = pid
Expand Down
32 changes: 16 additions & 16 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a844f80

Please sign in to comment.