mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +00:00
Added ExperimentModelView
This commit is contained in:
parent
4124c5cae5
commit
78fe69cfe1
2 changed files with 7 additions and 2 deletions
|
@ -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(StudentModelView(Student, db.session))
|
||||||
admin.add_view(PartStudentModelView(PartStudent, db.session))
|
admin.add_view(PartStudentModelView(PartStudent, db.session))
|
||||||
admin.add_view(GroupModelView(Group, db.session))
|
admin.add_view(GroupModelView(Group, db.session))
|
||||||
admin.add_view(SecureModelView(GroupExperiment, 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(PartExperiment, db.session))
|
||||||
admin.add_view(SecureModelView(Assistant, db.session))
|
admin.add_view(SecureModelView(Assistant, db.session))
|
||||||
admin.add_view(SecureModelView(Appointment, db.session))
|
admin.add_view(SecureModelView(Appointment, db.session))
|
||||||
|
|
|
@ -66,7 +66,7 @@ class Experiment(db.Model):
|
||||||
number = db.Column(db.Integer, nullable=False, unique=True)
|
number = db.Column(db.Integer, nullable=False, unique=True)
|
||||||
name = db.Column(db.String(200), nullable=False)
|
name = db.Column(db.String(200), nullable=False)
|
||||||
description = db.Column(db.Text, nullable=True)
|
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)
|
room = db.Column(db.String(100), nullable=False)
|
||||||
building = db.Column(db.String(100), nullable=False)
|
building = db.Column(db.String(100), nullable=False)
|
||||||
responsibility = db.Column(db.String(200), nullable=True)
|
responsibility = db.Column(db.String(200), nullable=True)
|
||||||
|
|
Loading…
Reference in a new issue