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,
|
DecimalField,
|
||||||
IntegerField,
|
IntegerField,
|
||||||
RadioField,
|
RadioField,
|
||||||
SelectField,
|
|
||||||
StringField,
|
StringField,
|
||||||
SubmitField,
|
SubmitField,
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
from flask import flash
|
from flask import flash
|
||||||
from flask_admin import expose
|
from flask_admin import expose
|
||||||
from flask_admin.contrib.sqla.fields import QuerySelectField, QuerySelectMultipleField
|
|
||||||
from flask_security import admin_change_password, current_user
|
from flask_security import admin_change_password, current_user
|
||||||
from sqlalchemy import and_
|
from wtforms import BooleanField, Form, StringField
|
||||||
from wtforms import BooleanField, Form, RadioField, SelectField, StringField
|
|
||||||
from wtforms.fields import DateField
|
|
||||||
from wtforms.validators import NumberRange, Optional
|
from wtforms.validators import NumberRange, Optional
|
||||||
|
|
||||||
from . import assistantSpace, db
|
from . import assistantSpace, db
|
||||||
|
@ -18,17 +15,9 @@ from .models import (
|
||||||
MIN_MARK,
|
MIN_MARK,
|
||||||
Appointment,
|
Appointment,
|
||||||
Assistant,
|
Assistant,
|
||||||
Experiment,
|
|
||||||
ExperimentMark,
|
ExperimentMark,
|
||||||
Group,
|
|
||||||
GroupExperiment,
|
GroupExperiment,
|
||||||
Part,
|
|
||||||
PartStudent,
|
|
||||||
Program,
|
|
||||||
Role,
|
|
||||||
Semester,
|
|
||||||
SemesterExperiment,
|
SemesterExperiment,
|
||||||
Student,
|
|
||||||
User,
|
User,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -110,8 +99,8 @@ class AssistantExperimentMarkView(SecureAssistantModelView):
|
||||||
form_columns = column_editable_list
|
form_columns = column_editable_list
|
||||||
|
|
||||||
form_args = {
|
form_args = {
|
||||||
"oral_mark": {"validators": [NumberRange(MIN_MARK, MAX_MARK)]},
|
"oral_mark": {"validators": [Optional(), NumberRange(MIN_MARK, MAX_MARK)]},
|
||||||
"protocol_mark": {"validators": [NumberRange(MIN_MARK, MAX_MARK)]},
|
"protocol_mark": {"validators": [Optional(), NumberRange(MIN_MARK, MAX_MARK)]},
|
||||||
}
|
}
|
||||||
|
|
||||||
column_default_sort = [("oral_mark", False), ("protocol_mark", False)]
|
column_default_sort = [("oral_mark", False), ("protocol_mark", False)]
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
= Admin documentation
|
= Admin's documentation
|
||||||
// TODO
|
|
||||||
|
// TODO:
|
||||||
|
Coming soon...
|
||||||
|
|
Loading…
Reference in a new issue