Added a whole lot of views.

Finished quiz API views
Finished question generator and answer eval
This commit is contained in:
2022-06-14 22:55:11 +01:00
parent a58f267586
commit 126bf9203c
15 changed files with 421 additions and 35 deletions

View File

@@ -33,4 +33,13 @@ def value(min:int=0, max:int=None):
value = field.data or 0
if value < min or max != None and value > max:
raise ValidationError(message)
return length
return length
def get_time_options():
time_options = [
('none', 'None'),
('60', '1 hour'),
('90', '1 hour 30 minutes'),
('120', '2 hours')
]
return time_options