Commit 466912a293781cea6d7903a92141b1e3d4447539
1 parent
1b1c0907
Exists in
master
Prepare the estimations for the emission models, in the database.
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
flaskr/models.py
@@ -42,6 +42,10 @@ class Estimation(db.Model): | @@ -42,6 +42,10 @@ class Estimation(db.Model): | ||
42 | origin_addresses = db.Column(db.UnicodeText()) | 42 | origin_addresses = db.Column(db.UnicodeText()) |
43 | destination_addresses = db.Column(db.UnicodeText()) | 43 | destination_addresses = db.Column(db.UnicodeText()) |
44 | 44 | ||
45 | + # One slug per line (or blankchar?) | ||
46 | + models_slugs = db.Column(db.UnicodeText()) | ||
47 | + | ||
48 | + # Deprecated, we detect this scenario from the amount of locations. | ||
45 | compute_optimal_destination = db.Column(db.Boolean()) | 49 | compute_optimal_destination = db.Column(db.Boolean()) |
46 | 50 | ||
47 | output_yaml = db.Column(db.UnicodeText()) | 51 | output_yaml = db.Column(db.UnicodeText()) |
@@ -65,6 +69,7 @@ class EstimationView(ModelView): | @@ -65,6 +69,7 @@ class EstimationView(ModelView): | ||
65 | 'status', | 69 | 'status', |
66 | 'first_name', | 70 | 'first_name', |
67 | 'last_name', | 71 | 'last_name', |
72 | + 'models_slugs', | ||
68 | 'origin_addresses', | 73 | 'origin_addresses', |
69 | 'destination_addresses', | 74 | 'destination_addresses', |
70 | 'warnings', | 75 | 'warnings', |
@@ -75,7 +80,6 @@ class EstimationView(ModelView): | @@ -75,7 +80,6 @@ class EstimationView(ModelView): | ||
75 | # name and email fields | 80 | # name and email fields |
76 | # column_searchable_list = ('name', 'email') | 81 | # column_searchable_list = ('name', 'email') |
77 | 82 | ||
78 | - # Add filters for name and email columns | ||
79 | column_filters = ('first_name', 'last_name') | 83 | column_filters = ('first_name', 'last_name') |
80 | 84 | ||
81 | 85 |