diff --git a/advlabdb/modelViews.py b/advlabdb/modelViews.py index f9ef7cb..ca25bde 100644 --- a/advlabdb/modelViews.py +++ b/advlabdb/modelViews.py @@ -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)) diff --git a/advlabdb/models.py b/advlabdb/models.py index f6c20b8..0332e45 100644 --- a/advlabdb/models.py +++ b/advlabdb/models.py @@ -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)