mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +00:00
Clean up
This commit is contained in:
parent
0285b79883
commit
a5fe640b0d
3 changed files with 7 additions and 17 deletions
|
@ -23,7 +23,6 @@ from wtforms.fields import (
|
|||
DecimalField,
|
||||
IntegerField,
|
||||
RadioField,
|
||||
SelectField,
|
||||
StringField,
|
||||
SubmitField,
|
||||
)
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
from flask import flash
|
||||
from flask_admin import expose
|
||||
from flask_admin.contrib.sqla.fields import QuerySelectField, QuerySelectMultipleField
|
||||
from flask_security import admin_change_password, current_user
|
||||
from sqlalchemy import and_
|
||||
from wtforms import BooleanField, Form, RadioField, SelectField, StringField
|
||||
from wtforms.fields import DateField
|
||||
from wtforms import BooleanField, Form, StringField
|
||||
from wtforms.validators import NumberRange, Optional
|
||||
|
||||
from . import assistantSpace, db
|
||||
|
@ -18,17 +15,9 @@ from .models import (
|
|||
MIN_MARK,
|
||||
Appointment,
|
||||
Assistant,
|
||||
Experiment,
|
||||
ExperimentMark,
|
||||
Group,
|
||||
GroupExperiment,
|
||||
Part,
|
||||
PartStudent,
|
||||
Program,
|
||||
Role,
|
||||
Semester,
|
||||
SemesterExperiment,
|
||||
Student,
|
||||
User,
|
||||
)
|
||||
|
||||
|
@ -110,8 +99,8 @@ class AssistantExperimentMarkView(SecureAssistantModelView):
|
|||
form_columns = column_editable_list
|
||||
|
||||
form_args = {
|
||||
"oral_mark": {"validators": [NumberRange(MIN_MARK, MAX_MARK)]},
|
||||
"protocol_mark": {"validators": [NumberRange(MIN_MARK, MAX_MARK)]},
|
||||
"oral_mark": {"validators": [Optional(), NumberRange(MIN_MARK, MAX_MARK)]},
|
||||
"protocol_mark": {"validators": [Optional(), NumberRange(MIN_MARK, MAX_MARK)]},
|
||||
}
|
||||
|
||||
column_default_sort = [("oral_mark", False), ("protocol_mark", False)]
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
= Admin documentation
|
||||
// TODO
|
||||
= Admin's documentation
|
||||
|
||||
// TODO:
|
||||
Coming soon...
|
||||
|
|
Loading…
Reference in a new issue