-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1921 from SEED-platform/meter-display-settings-up…
…dates Meter display settings updates
- Loading branch information
Showing
8 changed files
with
203 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
seed/lib/superperms/orgs/migrations/0011_auto_20190714_2159.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.21 on 2019-07-15 04:59 | ||
from __future__ import unicode_literals | ||
|
||
import django.contrib.postgres.fields.jsonb | ||
from django.db import migrations | ||
|
||
|
||
def update_display_meter_units_options(apps, schema_editor): | ||
Organization = apps.get_model('orgs', 'Organization') | ||
default_display_options = { | ||
'Coal (anthracite)': 'kBtu (thousand Btu)', | ||
'Coal (bituminous)': 'kBtu (thousand Btu)', | ||
'Coke': 'kBtu (thousand Btu)', | ||
'Diesel': 'kBtu (thousand Btu)', | ||
'District Chilled Water - Absorption': 'kBtu (thousand Btu)', | ||
'District Chilled Water - Electric': 'kBtu (thousand Btu)', | ||
'District Chilled Water - Engine': 'kBtu (thousand Btu)', | ||
'District Chilled Water - Other': 'kBtu (thousand Btu)', | ||
'District Hot Water': 'kBtu (thousand Btu)', | ||
'District Steam': 'kBtu (thousand Btu)', | ||
'Electric - Grid': 'kWh (thousand Watt-hours)', | ||
'Electric - Solar': 'kWh (thousand Watt-hours)', | ||
'Electric - Wind': 'kWh (thousand Watt-hours)', | ||
'Fuel Oil (No. 1)': 'kBtu (thousand Btu)', | ||
'Fuel Oil (No. 2)': 'kBtu (thousand Btu)', | ||
'Fuel Oil (No. 4)': 'kBtu (thousand Btu)', | ||
'Fuel Oil (No. 5 and No. 6)': 'kBtu (thousand Btu)', | ||
'Kerosene': 'kBtu (thousand Btu)', | ||
'Natural Gas': 'kBtu (thousand Btu)', | ||
'Other:': 'kBtu (thousand Btu)', | ||
'Propane': 'kBtu (thousand Btu)', | ||
'Wood': 'kBtu (thousand Btu)' | ||
} | ||
Organization.objects.all().update(display_meter_units=default_display_options) | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('orgs', '0010_auto_20190616_1351'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='organization', | ||
name='display_meter_units', | ||
field=django.contrib.postgres.fields.jsonb.JSONField(default={ | ||
'Coal (anthracite)': 'kBtu (thousand Btu)', | ||
'Coal (bituminous)': 'kBtu (thousand Btu)', | ||
'Coke': 'kBtu (thousand Btu)', | ||
'Diesel': 'kBtu (thousand Btu)', | ||
'District Chilled Water - Absorption': 'kBtu (thousand Btu)', | ||
'District Chilled Water - Electric': 'kBtu (thousand Btu)', | ||
'District Chilled Water - Engine': 'kBtu (thousand Btu)', | ||
'District Chilled Water - Other': 'kBtu (thousand Btu)', | ||
'District Hot Water': 'kBtu (thousand Btu)', | ||
'District Steam': 'kBtu (thousand Btu)', | ||
'Electric - Grid': 'kWh (thousand Watt-hours)', | ||
'Electric - Solar': 'kWh (thousand Watt-hours)', | ||
'Electric - Wind': 'kWh (thousand Watt-hours)', | ||
'Fuel Oil (No. 1)': 'kBtu (thousand Btu)', | ||
'Fuel Oil (No. 2)': 'kBtu (thousand Btu)', | ||
'Fuel Oil (No. 4)': 'kBtu (thousand Btu)', | ||
'Fuel Oil (No. 5 and No. 6)': 'kBtu (thousand Btu)', | ||
'Kerosene': 'kBtu (thousand Btu)', | ||
'Natural Gas': 'kBtu (thousand Btu)', | ||
'Other:': 'kBtu (thousand Btu)', | ||
'Propane': 'kBtu (thousand Btu)', | ||
'Wood': 'kBtu (thousand Btu)' | ||
}), | ||
), | ||
migrations.RunPython(update_display_meter_units_options), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.