diff --git a/app/forms/main/create_dept.py b/app/forms/main/create_dept.py index d1e143be..cd053405 100644 --- a/app/forms/main/create_dept.py +++ b/app/forms/main/create_dept.py @@ -54,6 +54,7 @@ class CreateDeptForm(FlaskForm): validators.DataRequired("acronyme du département requis"), ], ) + # description = StringField(label="Description") visible = BooleanField( "Visible sur page d'accueil", default=True, diff --git a/app/models/departements.py b/app/models/departements.py index a8c1bb1e..ebe5cc14 100644 --- a/app/models/departements.py +++ b/app/models/departements.py @@ -12,8 +12,10 @@ class Departement(db.Model): """Un département ScoDoc""" id = db.Column(db.Integer, primary_key=True) - acronym = db.Column(db.String(SHORT_STR_LEN), nullable=False, index=True) - description = db.Column(db.Text()) + acronym = db.Column( + db.String(SHORT_STR_LEN), nullable=False, index=True + ) # ne change jamais, voir la pref. DeptName + description = db.Column(db.Text()) # pas utilisé par ScoDoc : voir DeptFullName date_creation = db.Column(db.DateTime(timezone=True), server_default=db.func.now()) visible = db.Column( db.Boolean(), nullable=False, default=True, server_default="true" diff --git a/app/scodoc/sco_report.py b/app/scodoc/sco_report.py index d480679b..6c2582ef 100644 --- a/app/scodoc/sco_report.py +++ b/app/scodoc/sco_report.py @@ -49,16 +49,12 @@ from app.scodoc import sco_etud from app.scodoc import sco_excel from app.scodoc import sco_formsemestre from app.scodoc import sco_formsemestre_inscriptions -from app.scodoc import sco_formsemestre_status from app.scodoc import sco_parcours_dut -from app.scodoc import sco_pdf from app.scodoc import sco_preferences import sco_version from app.scodoc.gen_tables import GenTable from app import log from app.scodoc.sco_codes_parcours import code_semestre_validant -from app.scodoc.sco_exceptions import ScoValueError -from app.scodoc.sco_pdf import SU MAX_ETUD_IN_DESCR = 20 @@ -121,9 +117,9 @@ def _categories_and_results(etuds, category, result): categories[etud[category]] = True results[etud[result]] = True categories = list(categories.keys()) - categories.sort() + categories.sort(key=scu.heterogeneous_sorting_key) results = list(results.keys()) - results.sort() + results.sort(key=scu.heterogeneous_sorting_key) return categories, results @@ -166,7 +162,7 @@ def _results_by_category( l["sumpercent"] = "%2.1f%%" % ((100.0 * l["sum"]) / tot) # codes = list(results.keys()) - codes.sort() + codes.sort(key=scu.heterogeneous_sorting_key) bottom_titles = [] if C: # ligne du bas avec totaux: @@ -314,7 +310,7 @@ def formsemestre_report_counts( "type_admission", "boursier_prec", ] - keys.sort() + keys.sort(key=scu.heterogeneous_sorting_key) F = [ """

Colonnes: