Finished data upload
Refactored to move security package inside common Moved data folder to process root.
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
from flask_wtf import FlaskForm
|
||||
from flask_wtf.file import FileField, FileRequired, FileAllowed
|
||||
from wtforms import StringField, PasswordField, BooleanField, DateField, SelectField
|
||||
from wtforms.validators import InputRequired, Email, Length, EqualTo, Optional
|
||||
from datetime import date, timedelta
|
||||
@ -53,4 +54,7 @@ class CreateTest(FlaskForm):
|
||||
('120', '2 hours')
|
||||
]
|
||||
expiry_date = DateField('Expiry Date', format="%Y-%m-%d", validators=[InputRequired()], default = date.today() + timedelta(days=1) )
|
||||
time_limit = SelectField('Time Limit', choices=time_options)
|
||||
time_limit = SelectField('Time Limit', choices=time_options)
|
||||
|
||||
class UploadDataForm(FlaskForm):
|
||||
data_file = FileField('Data File', validators=[FileRequired(), FileAllowed(['json'])])
|
@ -5,7 +5,7 @@ from flask import flash, jsonify
|
||||
import secrets
|
||||
|
||||
from main import db
|
||||
from security import encrypt
|
||||
from common.security import encrypt
|
||||
|
||||
class Test:
|
||||
def __init__(self, _id=None, start_date=None, expiry_date=None, time_limit=None, creator=None):
|
||||
|
Reference in New Issue
Block a user