diff --git a/rowers/models.py b/rowers/models.py index 53db424f..2eca5a37 100644 --- a/rowers/models.py +++ b/rowers/models.py @@ -243,15 +243,9 @@ def update_records(url=c2url,verbose=True): class CalcAgePerformance(models.Model): - weightcategories = ( - ('hwt','heavy-weight'), - ('lwt','light-weight'), - ) + weightcategories = mytypes.weightcategories - sexcategories = ( - ('male','male'), - ('female','female'), - ) + sexcategories = mytypes.sexcategories weightcategory = models.CharField(default="hwt", max_length=30, @@ -288,10 +282,7 @@ class PowerTimeFitnessMetric(models.Model): @python_2_unicode_compatible class C2WorldClassAgePerformance(models.Model): - weightcategories = ( - ('hwt','heavy-weight'), - ('lwt','light-weight'), - ) + weightcategories = mytypes.weightcategories sexcategories = ( ('male','male'), @@ -593,10 +584,8 @@ sexcategories = ( ('female','female'), ('not specified','not specified'), ) -weightcategories = ( - ('hwt','heavy-weight'), - ('lwt','light-weight'), -) + +weightcategories = mytypes.weightcategories # Plan diff --git a/rowers/mytypes.py b/rowers/mytypes.py index c70ffbcc..294cb8bb 100644 --- a/rowers/mytypes.py +++ b/rowers/mytypes.py @@ -316,13 +316,23 @@ boattypes = ( ) adaptivetypes = ( - ('None','None'), + ('None','Open'), ('PR1', 'PR1 (Arms and Shoulders)'), ('PR2', 'PR2 (Trunk and Arms)'), ('PR3', 'PR3 (Leg Trunk and Arms)'), ('FES', 'FES (Functional Electrical Stimulation)'), ) +weightcategories = ( + ('hwt','open-weight'), + ('lwt','light-weight'), + ) + +sexcategories = ( + ('male','Open'), + ('female','Female'), + ) + waterboattype = [i[0] for i in boattypes] privacychoices = ( diff --git a/rowers/scoring.py b/rowers/scoring.py index b196b8f5..915a799b 100644 --- a/rowers/scoring.py +++ b/rowers/scoring.py @@ -84,12 +84,13 @@ def save_scoring(name,user,filename,id=0,notes=""): except KeyError: weightclass = 'hwt' + adaptiveclass = 'None' try: adaptiveclass = row['AdaptiveClass'] if adaptiveclass.lower() in ['o','open','none','no']: - adaptiveclass = None + adaptiveclass = 'None' except KeyError: - adaptiveclass = None + adaptiveclass = 'None' try: skillclass = row['SkillClass'] diff --git a/rowers/templates/standard_view.html b/rowers/templates/standard_view.html index e42b4aad..c76f0f49 100644 --- a/rowers/templates/standard_view.html +++ b/rowers/templates/standard_view.html @@ -57,9 +57,9 @@