Commit 845bbf90f849dae097914d082a30f3710728668a

Authored by Antoine Goutenoir
1 parent a728e600
Exists in master

Activate the `selected` keyword in model config.

Implements #10
flaskr/forms.py
... ... @@ -134,8 +134,7 @@ for model in models:
134 134 BooleanField(
135 135 label=model.name,
136 136 # description=model.short_description,
137   - default=True,
138   - # default=model.default, # todo: from config
  137 + default=model.selected,
139 138 validators=[
140 139 validators.Optional(),
141 140 ],
... ...
flaskr/laws/travel_emission_linear_fit.py
... ... @@ -8,6 +8,7 @@ class BaseEmissionModel():
8 8 self.name = config.name
9 9 self.slug = config.slug
10 10 self.color = config.color
  11 + self.selected = config.selected
11 12 self.config = config.config
12 13  
13 14 def __repr__(self): # Cast to String
... ...