1
0
Fork 0
mirror of https://codeberg.org/Mo8it/AdvLabDB.git synced 2024-12-20 23:41:20 +00:00

Added ExperimentModelView

This commit is contained in:
Mo 2021-06-21 18:07:18 +02:00
parent 4124c5cae5
commit 78fe69cfe1
2 changed files with 7 additions and 2 deletions

View file

@ -302,11 +302,16 @@ class GroupModelView(SecureModelView):
)
class ExperimentModelView(SecureModelView):
can_view_details = True
column_filters = ["deprecated"]
admin.add_view(StudentModelView(Student, db.session))
admin.add_view(PartStudentModelView(PartStudent, db.session))
admin.add_view(GroupModelView(Group, db.session))
admin.add_view(SecureModelView(GroupExperiment, db.session))
admin.add_view(SecureModelView(Experiment, db.session))
admin.add_view(ExperimentModelView(Experiment, db.session))
admin.add_view(SecureModelView(PartExperiment, db.session))
admin.add_view(SecureModelView(Assistant, db.session))
admin.add_view(SecureModelView(Appointment, db.session))

View file

@ -66,7 +66,7 @@ class Experiment(db.Model):
number = db.Column(db.Integer, nullable=False, unique=True)
name = db.Column(db.String(200), nullable=False)
description = db.Column(db.Text, nullable=True)
wiki_link = db.Column(db.String(200), nullalbe=True)
wiki_link = db.Column(db.String(200), nullable=True)
room = db.Column(db.String(100), nullable=False)
building = db.Column(db.String(100), nullable=False)
responsibility = db.Column(db.String(200), nullable=True)