-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
発表用媒体(PDF, etc)を返すエンドポイントを作成 #183
Comments
FlaskでPDFを返す方法: https://aroundthedistance.hatenadiary.jp/entry/2015/01/18/234425 |
HTTP method: |
rfc has been opened Sakuten/rfcs#2 |
権限範囲は決定しないことになりました。 |
時間外だった場合のエラーコードおよびstatus code |
|
時間外、400では? |
あ、ほんとだww |
…us time index This method would work like this: |-- TIME_POINTS[0] | | |-- TIME_POINTS[1] | | | ||-- TIMEPOINT_END_MARGIN | || | || |-- DRAWWING_TIME EXTENSION | || | | || | |-- Void time (annoucements, the show is going...) | || | | v index: x vv v v index: y index: z |=============|-|******| |=============|-|******| |=============|-| |++++++++++++++++++++++++++++++++| |________________________________| In the range of |+|, `get_prev_time_index` will return `x`. In the range of |_|, `get_prev_time_index` will return `y`.
|
This comment has been minimized.
This comment has been minimized.
データ構造的によろしくないかもしれませんが、ちょっと進ませてくだせぇ.. |
配列の分け方、リファクタリングが必要な部分です。 data = {'kinds':
[{'visitor':
[{'classroom_id': lottery.classroom_id,
'winners': [lottery.application.user(has 'visitor' kind)]
}],
'student':
[{'classroom_id': lottery.classroom_id,
'winners': [lottery.application.user(has 'student' kind)]
}]
}]
} |
PDFきつそうなので一度HTMLで返します PDFで返すissueも立てておきますが、 |
又、HTMLに変更したことにより、cacheを持つ必要も無くなったので、cache関連のtodoを削除します |
🤔 |
The diagram on the commit message was wrong, so DON'T PREFER TO IT. Instead, see notes. you can show notes by using: ``` git notes show 3fb5c1a ```
…dex' Test whether it fail when the time is out of acceptable range
…e edge of range If I do `ends[i] <= time <= ends[i+1]`, This expression will be True twice when `time` is the same as `ends[i+1]` because that would be the same as `ends[i] for the next expression. Of cource, this conflict won't work because of looping, But it is not good idea to leave things confusing, right? So I fixed it
it's because the way generating PDF could be hard to do in such a limited time. I found that wkhtmltopdf doesn't treat CSS on alpine. It'll take more times to solve
A0サイズををCSSで表現するとき |
close with merging of #212 |
Step 1: 目的
Step 2: 概要
仕様: 一個前のtime_indexの各lotteryのwinnersのpublic_idを、classroomごとにわけ、かつその中でstudent/visitorで分けて印刷可能にしたものを返す。作成した媒体はキャッシュする。
既に作成されている場合は、キャッシュされたものを返す
エンドポイント名は、
PDFという文字列を含まないもの
rfc: /results -- 権限範囲 rfcs#2
タスク:
返す形式を決定(PDF or html)
PDF or HTMLのテンプレートを作成する(おそらくjinja)
html
部分の作成css
部分の作成エンドポイント名を決定
権限範囲決定 ( /results -- 権限範囲 rfcs#2)
spec
作成エンドポイントを作成
get_prev_time_index
追加test作成
決定事項:
PDFHTML(システムの都合上PDF化は時間がかかりそうでした)/render_results
GET
06
400
not acceptable time
The text was updated successfully, but these errors were encountered: