Models
Submodules
AuditLog
SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/SEED-platform/seed/blob/main/LICENSE.md
Columns
SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/SEED-platform/seed/blob/main/LICENSE.md
- class seed.models.columns.Column(*args, **kwargs)
Bases:
Model
The name of a column for a given organization.
- COLUMN_EXCLUDE_FIELDS = ['bounding_box', 'centroid', 'created', 'data_state', 'derived_data', 'extra_data', 'geocoding_confidence', 'id', 'import_file', 'long_lat', 'merge_state', 'raw_access_level_instance_error', 'raw_access_level_instance_id', 'source_type', 'updated', 'hash_object', 'normalized_address', 'source_eui_modeled_orig', 'site_eui_orig', 'occupied_floor_area_orig', 'site_eui_weather_normalized_orig', 'site_eui_modeled_orig', 'source_eui_orig', 'gross_floor_area_orig', 'conditioned_floor_area_orig', 'source_eui_weather_normalized_orig']
- COLUMN_MERGE_FAVOR_EXISTING = 1
- COLUMN_MERGE_FAVOR_NEW = 0
- COLUMN_MERGE_PROTECTION = [(0, 'Favor New'), (1, 'Favor Existing')]
- DATABASE_COLUMNS = [{'column_description': 'PM Property ID', 'column_name': 'pm_property_id', 'data_type': 'string', 'display_name': 'PM Property ID', 'table_name': 'PropertyState'}, {'column_description': 'PM Parent Property ID', 'column_name': 'pm_parent_property_id', 'data_type': 'string', 'display_name': 'PM Parent Property ID', 'table_name': 'PropertyState'}, {'column_description': 'Jurisdiction Tax Lot ID', 'column_name': 'jurisdiction_tax_lot_id', 'data_type': 'string', 'display_name': 'Jurisdiction Tax Lot ID', 'table_name': 'TaxLotState'}, {'column_description': 'Jurisdiction Property ID', 'column_name': 'jurisdiction_property_id', 'data_type': 'string', 'display_name': 'Jurisdiction Property ID', 'table_name': 'PropertyState'}, {'column_description': 'UBID', 'column_name': 'ubid', 'data_type': 'string', 'display_name': 'UBID', 'table_name': 'TaxLotState'}, {'column_description': 'UBID', 'column_name': 'ubid', 'data_type': 'string', 'display_name': 'UBID', 'table_name': 'PropertyState'}, {'column_description': 'Custom ID 1', 'column_name': 'custom_id_1', 'data_type': 'string', 'display_name': 'Custom ID 1', 'table_name': 'PropertyState'}, {'column_description': 'Custom ID 1', 'column_name': 'custom_id_1', 'data_type': 'string', 'display_name': 'Custom ID 1', 'table_name': 'TaxLotState'}, {'column_description': 'Audit Template Building ID', 'column_name': 'audit_template_building_id', 'data_type': 'string', 'display_name': 'Audit Template Building ID', 'table_name': 'PropertyState'}, {'column_description': 'Address Line 1', 'column_name': 'address_line_1', 'data_type': 'string', 'display_name': 'Address Line 1', 'table_name': 'PropertyState'}, {'column_description': 'Address Line 1', 'column_name': 'address_line_1', 'data_type': 'string', 'display_name': 'Address Line 1', 'table_name': 'TaxLotState'}, {'column_description': 'Address Line 2', 'column_name': 'address_line_2', 'data_type': 'string', 'display_name': 'Address Line 2', 'table_name': 'PropertyState'}, {'column_description': 'Address Line 2', 'column_name': 'address_line_2', 'data_type': 'string', 'display_name': 'Address Line 2', 'table_name': 'TaxLotState'}, {'column_description': 'City', 'column_name': 'city', 'data_type': 'string', 'display_name': 'City', 'table_name': 'PropertyState'}, {'column_description': 'City', 'column_name': 'city', 'data_type': 'string', 'display_name': 'City', 'table_name': 'TaxLotState'}, {'column_description': 'State', 'column_name': 'state', 'data_type': 'string', 'display_name': 'State', 'table_name': 'PropertyState'}, {'column_description': 'State', 'column_name': 'state', 'data_type': 'string', 'display_name': 'State', 'table_name': 'TaxLotState'}, {'column_description': 'Normalized Address', 'column_name': 'normalized_address', 'data_type': 'string', 'display_name': 'Normalized Address', 'table_name': 'PropertyState'}, {'column_description': 'Normalized Address', 'column_name': 'normalized_address', 'data_type': 'string', 'display_name': 'Normalized Address', 'table_name': 'TaxLotState'}, {'column_description': 'Postal Code', 'column_name': 'postal_code', 'data_type': 'string', 'display_name': 'Postal Code', 'table_name': 'PropertyState'}, {'column_description': 'Postal Code', 'column_name': 'postal_code', 'data_type': 'string', 'display_name': 'Postal Code', 'table_name': 'TaxLotState'}, {'column_description': 'Associated Tax Lot ID', 'column_name': 'lot_number', 'data_type': 'string', 'display_name': 'Associated Tax Lot ID', 'table_name': 'PropertyState'}, {'column_description': 'Property Name', 'column_name': 'property_name', 'data_type': 'string', 'display_name': 'Property Name', 'table_name': 'PropertyState'}, {'column_description': 'Latitude', 'column_name': 'latitude', 'data_type': 'number', 'display_name': 'Latitude', 'table_name': 'PropertyState'}, {'column_description': 'Longitude', 'column_name': 'longitude', 'data_type': 'number', 'display_name': 'Longitude', 'table_name': 'PropertyState'}, {'column_description': 'Latitude', 'column_name': 'latitude', 'data_type': 'number', 'display_name': 'Latitude', 'table_name': 'TaxLotState'}, {'column_description': 'Longitude', 'column_name': 'longitude', 'data_type': 'number', 'display_name': 'Longitude', 'table_name': 'TaxLotState'}, {'column_description': 'Geocoding Confidence', 'column_name': 'geocoding_confidence', 'data_type': 'string', 'display_name': 'Geocoding Confidence', 'table_name': 'PropertyState'}, {'column_description': 'Geocoding Confidence', 'column_name': 'geocoding_confidence', 'data_type': 'string', 'display_name': 'Geocoding Confidence', 'table_name': 'TaxLotState'}, {'column_description': 'Property Footprint', 'column_name': 'property_footprint', 'data_type': 'geometry', 'display_name': 'Property Footprint', 'table_name': 'PropertyState'}, {'column_description': 'Tax Lot Footprint', 'column_name': 'taxlot_footprint', 'data_type': 'geometry', 'display_name': 'Tax Lot Footprint', 'table_name': 'TaxLotState'}, {'column_description': 'Updated', 'column_name': 'updated', 'data_type': 'datetime', 'display_name': 'Updated', 'table_name': 'PropertyState'}, {'column_description': 'Created', 'column_name': 'created', 'data_type': 'datetime', 'display_name': 'Created', 'table_name': 'PropertyState'}, {'column_description': 'Updated', 'column_name': 'updated', 'data_type': 'datetime', 'display_name': 'Updated', 'table_name': 'TaxLotState'}, {'column_description': 'Created', 'column_name': 'created', 'data_type': 'datetime', 'display_name': 'Created', 'table_name': 'TaxLotState'}, {'column_description': 'Gross Floor Area', 'column_name': 'gross_floor_area', 'data_type': 'area', 'display_name': 'Gross Floor Area', 'table_name': 'PropertyState'}, {'column_description': 'Use Description', 'column_name': 'use_description', 'data_type': 'string', 'display_name': 'Use Description', 'table_name': 'PropertyState'}, {'column_description': 'ENERGY STAR Score', 'column_name': 'energy_score', 'data_type': 'integer', 'display_name': 'ENERGY STAR Score', 'table_name': 'PropertyState'}, {'column_description': 'Property Notes', 'column_name': 'property_notes', 'data_type': 'string', 'display_name': 'Property Notes', 'table_name': 'PropertyState'}, {'column_description': 'Property Type', 'column_name': 'property_type', 'data_type': 'string', 'display_name': 'Property Type', 'table_name': 'PropertyState'}, {'column_description': 'Year Ending', 'column_name': 'year_ending', 'data_type': 'date', 'display_name': 'Year Ending', 'table_name': 'PropertyState'}, {'column_description': 'Owner', 'column_name': 'owner', 'data_type': 'string', 'display_name': 'Owner', 'table_name': 'PropertyState'}, {'column_description': 'Owner Email', 'column_name': 'owner_email', 'data_type': 'string', 'display_name': 'Owner Email', 'table_name': 'PropertyState'}, {'column_description': 'Owner Telephone', 'column_name': 'owner_telephone', 'data_type': 'string', 'display_name': 'Owner Telephone', 'table_name': 'PropertyState'}, {'column_description': 'Building Count', 'column_name': 'building_count', 'data_type': 'integer', 'display_name': 'Building Count', 'table_name': 'PropertyState'}, {'column_description': 'Year Built', 'column_name': 'year_built', 'data_type': 'integer', 'display_name': 'Year Built', 'table_name': 'PropertyState'}, {'column_description': 'Recent Sale Date', 'column_name': 'recent_sale_date', 'data_type': 'datetime', 'display_name': 'Recent Sale Date', 'table_name': 'PropertyState'}, {'column_description': 'Conditioned Floor Area', 'column_name': 'conditioned_floor_area', 'data_type': 'area', 'display_name': 'Conditioned Floor Area', 'table_name': 'PropertyState'}, {'column_description': 'Occupied Floor Area', 'column_name': 'occupied_floor_area', 'data_type': 'area', 'display_name': 'Occupied Floor Area', 'table_name': 'PropertyState'}, {'column_description': 'Owner Address', 'column_name': 'owner_address', 'data_type': 'string', 'display_name': 'Owner Address', 'table_name': 'PropertyState'}, {'column_description': 'Owner City/State', 'column_name': 'owner_city_state', 'data_type': 'string', 'display_name': 'Owner City/State', 'table_name': 'PropertyState'}, {'column_description': 'Owner Postal Code', 'column_name': 'owner_postal_code', 'data_type': 'string', 'display_name': 'Owner Postal Code', 'table_name': 'PropertyState'}, {'column_description': 'Home Energy Score ID', 'column_name': 'home_energy_score_id', 'data_type': 'string', 'display_name': 'Home Energy Score ID', 'table_name': 'PropertyState'}, {'column_description': 'PM Generation Date', 'column_name': 'generation_date', 'data_type': 'datetime', 'display_name': 'PM Generation Date', 'table_name': 'PropertyState'}, {'column_description': 'PM Release Date', 'column_name': 'release_date', 'data_type': 'datetime', 'display_name': 'PM Release Date', 'table_name': 'PropertyState'}, {'column_description': 'Site EUI', 'column_name': 'site_eui', 'data_type': 'eui', 'display_name': 'Site EUI', 'table_name': 'PropertyState'}, {'column_description': 'Site EUI Weather Normalized', 'column_name': 'site_eui_weather_normalized', 'data_type': 'eui', 'display_name': 'Site EUI Weather Normalized', 'table_name': 'PropertyState'}, {'column_description': 'Site EUI Modeled', 'column_name': 'site_eui_modeled', 'data_type': 'eui', 'display_name': 'Site EUI Modeled', 'table_name': 'PropertyState'}, {'column_description': 'Source EUI', 'column_name': 'source_eui', 'data_type': 'eui', 'display_name': 'Source EUI', 'table_name': 'PropertyState'}, {'column_description': 'Source EUI Weather Normalized', 'column_name': 'source_eui_weather_normalized', 'data_type': 'eui', 'display_name': 'Source EUI Weather Normalized', 'table_name': 'PropertyState'}, {'column_description': 'Source EUI Modeled', 'column_name': 'source_eui_modeled', 'data_type': 'eui', 'display_name': 'Source EUI Modeled', 'table_name': 'PropertyState'}, {'column_description': 'Energy Alerts', 'column_name': 'energy_alerts', 'data_type': 'string', 'display_name': 'Energy Alerts', 'table_name': 'PropertyState'}, {'column_description': 'Space Alerts', 'column_name': 'space_alerts', 'data_type': 'string', 'display_name': 'Space Alerts', 'table_name': 'PropertyState'}, {'column_description': 'Building Certification', 'column_name': 'building_certification', 'data_type': 'string', 'display_name': 'Building Certification', 'table_name': 'PropertyState'}, {'column_description': 'Number Properties', 'column_name': 'number_properties', 'data_type': 'integer', 'display_name': 'Number Properties', 'table_name': 'TaxLotState'}, {'column_description': 'Block Number', 'column_name': 'block_number', 'data_type': 'string', 'display_name': 'Block Number', 'table_name': 'TaxLotState'}, {'column_description': 'District', 'column_name': 'district', 'data_type': 'string', 'display_name': 'District', 'table_name': 'TaxLotState'}, {'column_description': 'eGRID Subregion Code', 'column_name': 'egrid_subregion_code', 'data_type': 'string', 'display_name': 'eGRID Subregion Code', 'table_name': 'PropertyState'}, {'column_description': 'Total GHG Emissions', 'column_name': 'total_ghg_emissions', 'data_type': 'ghg', 'display_name': 'Total GHG Emissions', 'table_name': 'PropertyState'}, {'column_description': 'Total Marginal GHG Emissions', 'column_name': 'total_marginal_ghg_emissions', 'data_type': 'ghg', 'display_name': 'Total Marginal GHG Emissions', 'table_name': 'PropertyState'}, {'column_description': 'Total GHG Emissions Intensity', 'column_name': 'total_ghg_emissions_intensity', 'data_type': 'ghg_intensity', 'display_name': 'Total GHG Emissions Intensity', 'table_name': 'PropertyState'}, {'column_description': 'Total Marginal GHG Emissions Intensity', 'column_name': 'total_marginal_ghg_emissions_intensity', 'data_type': 'ghg_intensity', 'display_name': 'Total Marginal GHG Emissions Intensity', 'table_name': 'PropertyState'}, {'column_description': 'Time zone of the property', 'column_name': 'property_timezone', 'data_type': 'string', 'display_name': 'Property Time Zone', 'table_name': 'PropertyState'}, {'column_description': 'Water Use (All Water Sources)', 'column_name': 'water_use', 'data_type': 'water_use', 'display_name': 'Water Use', 'table_name': 'PropertyState'}, {'column_description': 'Indoor Water Use (All Water Sources)', 'column_name': 'indoor_water_use', 'data_type': 'water_use', 'display_name': 'Indoor Water Use', 'table_name': 'PropertyState'}, {'column_description': 'Outdoor Water Use (All Water Sources)', 'column_name': 'outdoor_water_use', 'data_type': 'water_use', 'display_name': 'Outdoor Water Use', 'table_name': 'PropertyState'}, {'column_description': 'Water Use Intensity (All Water Sources)', 'column_name': 'wui', 'data_type': 'wui', 'display_name': 'WUI', 'table_name': 'PropertyState'}, {'column_description': 'Indoor Water Use Intensity (All Water Sources)', 'column_name': 'indoor_wui', 'data_type': 'wui', 'display_name': 'Indoor WUI', 'table_name': 'PropertyState'}]
- DATA_TYPE_PARSERS: dict[str, Callable] = {'area': <function Column.<lambda>>, 'boolean': <function Column.<lambda>>, 'date': <function Column.<lambda>>, 'datetime': <built-in method fromisoformat of type object>, 'eui': <function Column.<lambda>>, 'float': <function Column.<lambda>>, 'geometry': <class 'str'>, 'ghg': <function Column.<lambda>>, 'ghg_intensity': <function Column.<lambda>>, 'integer': <function Column.<lambda>>, 'number': <function Column.<lambda>>, 'string': <class 'str'>, 'water_use': <function Column.<lambda>>, 'wui': <function Column.<lambda>>}
- DB_TYPES = {'area': 'float', 'boolean': 'boolean', 'date': 'date', 'datetime': 'datetime', 'eui': 'float', 'float': 'float', 'geometry': 'geometry', 'ghg': 'float', 'ghg_intensity': 'float', 'integer': 'integer', 'number': 'float', 'string': 'string', 'water_use': 'float', 'wui': 'float'}
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- EXCLUDED_COLUMN_RETURN_FIELDS = ['hash_object', 'normalized_address', 'source_eui_modeled_orig', 'site_eui_orig', 'occupied_floor_area_orig', 'site_eui_weather_normalized_orig', 'site_eui_modeled_orig', 'source_eui_orig', 'gross_floor_area_orig', 'conditioned_floor_area_orig', 'source_eui_weather_normalized_orig']
- EXCLUDED_MAPPING_FIELDS = ['created', 'extra_data', 'lot_number', 'normalized_address', 'geocoded_address', 'geocoded_postal_code', 'geocoded_side_of_street', 'geocoded_country', 'geocoded_state', 'geocoded_county', 'geocoded_city', 'geocoded_neighborhood', 'updated']
- EXCLUDED_RENAME_FROM_FIELDS = ['lot_number', 'year_built', 'property_footprint', 'taxlot_footprint', 'bounding_box', 'centroid', 'created', 'data_state', 'derived_data', 'extra_data', 'geocoding_confidence', 'id', 'import_file', 'long_lat', 'merge_state', 'raw_access_level_instance_error', 'raw_access_level_instance_id', 'source_type', 'updated', 'hash_object', 'normalized_address', 'source_eui_modeled_orig', 'site_eui_orig', 'occupied_floor_area_orig', 'site_eui_weather_normalized_orig', 'site_eui_modeled_orig', 'source_eui_orig', 'gross_floor_area_orig', 'conditioned_floor_area_orig', 'source_eui_weather_normalized_orig']
- EXCLUDED_RENAME_TO_FIELDS = ['lot_number', 'latitude', 'longitude', 'year_built', 'property_footprint', 'created', 'updated', 'bounding_box', 'centroid', 'created', 'data_state', 'derived_data', 'extra_data', 'geocoding_confidence', 'id', 'import_file', 'long_lat', 'merge_state', 'raw_access_level_instance_error', 'raw_access_level_instance_id', 'source_type', 'updated', 'hash_object', 'normalized_address', 'source_eui_modeled_orig', 'site_eui_orig', 'occupied_floor_area_orig', 'site_eui_weather_normalized_orig', 'site_eui_modeled_orig', 'source_eui_orig', 'gross_floor_area_orig', 'conditioned_floor_area_orig', 'source_eui_weather_normalized_orig']
- INTERNAL_TYPE_TO_DATA_TYPE = {'BooleanField': 'boolean', 'CharField': 'string', 'DateField': 'date', 'DateTimeField': 'datetime', 'FloatField': 'double', 'IntegerField': 'integer', 'JSONField': 'string', 'PointField': 'geometry', 'PolygonField': 'geometry', 'TextField': 'string'}
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- PINNED_COLUMNS = [('PropertyState', 'pm_property_id'), ('TaxLotState', 'jurisdiction_tax_lot_id')]
- QUANTITY_UNIT_COLUMNS = [('PropertyState', 'gross_floor_area'), ('PropertyState', 'occupied_floor_area'), ('PropertyState', 'conditioned_floor_area'), ('PropertyState', 'site_eui'), ('PropertyState', 'site_eui_modeled'), ('PropertyState', 'site_eui_weather_normalized'), ('PropertyState', 'source_eui'), ('PropertyState', 'source_eui_modeled'), ('PropertyState', 'source_eui_weather_normalized'), ('PropertyState', 'total_ghg_emissions'), ('PropertyState', 'total_marginal_ghg_emissions'), ('PropertyState', 'total_ghg_emissions_intensity'), ('PropertyState', 'total_marginal_ghg_emissions_intensity'), ('PropertyState', 'water_use'), ('PropertyState', 'indoor_water_use'), ('PropertyState', 'outdoor_water_use'), ('PropertyState', 'wui'), ('PropertyState', 'indoor_wui')]
- SHARED_FIELD_TYPES = ((0, 'None'), (1, 'Public'))
- SHARED_NONE = 0
- SHARED_PUBLIC = 1
- UNMAPPABLE_PROPERTY_FIELDS = ['created', 'geocoding_confidence', 'lot_number', 'updated']
- UNMAPPABLE_TAXLOT_FIELDS = ['created', 'geocoding_confidence', 'updated']
- account_name_column
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- actual_emission_column
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- actual_energy_column
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- benchmark_id_column
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- cast(value: Any) Any
Cast the value to the correct type for the column.
- Args:
value (Any): Value to cast, typically a string.
- static cast_column_value(column_data_type: str, value: Any, allow_none: bool = True) Any
cast a single value from the column data type
- Args:
column_data_type (str): The data type as defined in the column object value (Any): value to cast. Note the value may already be cast correctly.
- Raises:
Exception: CastException if the value cannot be cast to the correct type
- Returns:
Any: Resulting casted value
- clean()
Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.
- column_description
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- column_list_profiles
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- column_name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- columnlistprofilecolumn_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- comstock_mapping
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- contact_email_column
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- contact_name_column
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- static create_mappings(mappings, organization, user, import_file_id=None)
Create the mappings for an organization and a user based on a simple array of array object.
- Parameters:
mappings – dict, dictionary containing mapping information
organization – inst, organization object
user – inst, User object
import_file_id – integer, If passed, will cache the column mappings data into the import_file_id object.
:return Boolean, True is data are saved in the ColumnMapping table in the database
- static create_mappings_from_file(filename, organization, user, import_file_id=None)
Load the mappings in from a file in a very specific file format. The columns in the file must be:
raw field
table name
field name
field display name
field data type
field unit type
- Parameters:
filename – string, absolute path and name of file to load
organization – id, organization id
user – id, user id
import_file_id – Integer, If passed, will cache the column mappings data into the import_file_id object.
- Returns:
ColumnMapping, True
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- data_admin_account_name_column
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- data_admin_email_column
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- data_admin_name_column
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- data_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- dataviewparameter_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- static delete_all(organization)
Delete all the columns for an organization. Note that this will invalidate all the data that is in the extra_data fields of the inventory and is irreversible.
- Parameters:
organization – instance, Organization
- Returns:
[int, int] Number of columns, column_mappings records that were deleted
- derived_column
Accessor to the related object on the forward side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Restaurant.place
is aForwardOneToOneDescriptor
instance.
- derived_column_id
- derivedcolumn_set
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- derivedcolumnparameter_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- display_name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- geocoding_order
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_merge_protection_display(*, field=<django.db.models.fields.IntegerField: merge_protection>)
- get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)
- goal_area_columns
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- goal_eui_column1s
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- goal_eui_column2s
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- goal_eui_column3s
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- import_file
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- import_file_id
- is_excluded_from_hash
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_extra_data
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_matching_criteria
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_option_for_reports_x_axis
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_option_for_reports_y_axis
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- is_updating
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- mapped_mappings
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- merge_protection
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- modified
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- organization
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organization_id
- raw_mappings
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- recognize_empty
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- rename_column(new_column_name, force=False)
Rename the column and move all the data to the new column. This can move the data from a canonical field to an extra data field or vice versa. By default the column.
- Parameters:
new_column_name – string new name of column
force – boolean force the overwrite of data in the column?
- Returns:
- static retrieve_all(org_id: int, inventory_type: Literal['property', 'taxlot'] | None = None, only_used: bool = False, include_related: bool = True, exclude_derived: bool = False, column_ids: list[int] | None = None) list[dict]
Retrieve all the columns for an organization. This method will query for all the columns in the database assigned to the organization. It will then go through and cleanup the names to ensure that there are no duplicates. The name column is used for uniquely labeling the columns for UI Grid purposes.
- Parameters:
org_id – Organization ID
inventory_type – Inventory Type (property|taxlot) from the requester. This sets the related columns if requested.
only_used – View only the used columns that exist in the Column’s table
include_related – Include related columns (e.g., if inventory type is Property, include Taxlot columns)
exclude_derived – Exclude derived columns.
column_ids – List of Column ids.
- static retrieve_all_by_tuple(org_id)
Return list of all columns for an organization as a tuple.
[ ("PropertyState", "address_line_1"), ("PropertyState", "address_line_2"), ("PropertyState", "building_certification"), ("PropertyState", "building_count"), ("TaxLotState", "address_line_1"), ("TaxLotState", "address_line_2"), ("TaxLotState", "block_number"), ("TaxLotState", "city"), ("TaxLotState", "jurisdiction_tax_lot_id"), ]
- Parameters:
org_id – int, Organization ID
- Returns:
list of tuples
- static retrieve_db_field_name_for_hash_comparison(inventory_type, organization_id)
Names only of the columns in the database (fields only, not extra data), independent of inventory type. These fields are used for generating an MD5 hash to quickly check if the data are the same across multiple records. Note that this ignores extra_data. The result is a superset of all the fields that are used in the database across all of the inventory types of interest.
- Returns:
list, names of columns, independent of inventory type.
- static retrieve_db_field_table_and_names_from_db_tables()
Similar to keys, except it returns a list of tuples of the columns that are in the database
[ ("PropertyState", "address_line_1"), ("PropertyState", "address_line_2"), ("PropertyState", "building_certification"), ("PropertyState", "building_count"), ("TaxLotState", "address_line_1"), ("TaxLotState", "address_line_2"), ("TaxLotState", "block_number"), ("TaxLotState", "city"), ("TaxLotState", "jurisdiction_tax_lot_id"), ]
:return:list of tuples
- static retrieve_db_fields(org_id)
return the fields in the database regardless of properties or taxlots. For example, there is an address_line_1 in both the TaxLotState and the PropertyState. The command below will take the set to remove the duplicates.
[ “address_line_1”, “gross_floor_area”, … ] :param org_id: int, Organization ID :return: list
- static retrieve_db_fields_from_db_tables()
Return the list of database fields that are in the models. This is independent of what are in the Columns table.
- Returns:
- static retrieve_db_types()
Return the data types for the database columns in the format of:
{ "field_name": "data_type", "field_name_2": "data_type_2", "address_line_1": "string", }
- Returns:
dict
- static retrieve_mapping_columns(org_id, inventory_type=None)
Retrieve all the columns that are for mapping for an organization in a dictionary.
- Parameters:
org_id – org_id, Organization ID
inventory_type – Inventory Type (property|taxlot) from the requester. This sets the related columns if requested.
- Returns:
list, list of dict
- static retrieve_priorities(org_id)
Return the list of priorities for the columns. Result will be in the form of:
{ 'PropertyState': { 'lot_number': 'Favor New', 'owner_address': 'Favor New', 'extra_data': { 'data_007': 'Favor New' } 'TaxLotState': { 'custom_id_1': 'Favor New', 'block_number': 'Favor New', 'extra_data': { 'data_008': 'Favor New' } }
- Parameters:
org_id – organization with the columns
- Returns:
dict
- salesforce_column
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- save(*args, **kwargs)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- static save_column_names(model_obj)
Save unique column names for extra_data in this organization.
This is a record of all the extra_data keys we have ever seen for a particular organization.
- Parameters:
model_obj – model_obj instance (either PropertyState or TaxLotState).
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- table_name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- target_emission_column
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- target_energy_column
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- unit
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- unit_id
- units_pint
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- x_axis_columns
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- exception seed.models.columns.ColumnCastError
Bases:
Exception
- seed.models.columns.validate_model(sender, **kwargs)
Cycles
SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/SEED-platform/seed/blob/main/LICENSE.md
- class seed.models.cycles.Cycle(id, organization, user, name, start, end, created)
Bases:
Model
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- analysispropertyview_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- cycles
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- dataview_set
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- end
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- event_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)
- get_next_by_end(*, field=<django.db.models.fields.DateField: end>, is_next=True, **kwargs)
- get_next_by_start(*, field=<django.db.models.fields.DateField: start>, is_next=True, **kwargs)
- classmethod get_or_create_default(organization)
- get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_end(*, field=<django.db.models.fields.DateField: end>, is_next=False, **kwargs)
- get_previous_by_start(*, field=<django.db.models.fields.DateField: start>, is_next=False, **kwargs)
- goal_baseline_cycles
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- goal_current_cycles
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- importfile_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- organization
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organization_id
- propertyview_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- start
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- taxlotproperty_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- taxlotview_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- user
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- user_id
Joins
Generic Models
SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/SEED-platform/seed/blob/main/LICENSE.md
- class seed.models.models.StatusLabel(id, created, modified, name, color, super_organization, show_in_list)
Bases:
TimeStampedModel
- BLUE_CHOICE = 'blue'
- COLOR_CHOICES = (('red', 'red'), ('blue', 'blue'), ('light blue', 'light blue'), ('green', 'green'), ('white', 'white'), ('orange', 'orange'), ('gray', 'gray'))
- DEFAULT_LABELS = ['Residential', 'Non-Residential', 'Violation', 'Compliant', 'Missing Data', 'Questionable Report', 'Update Bldg Info', 'Call', 'Email', 'Exempted', 'Extension', 'Change of Ownership', 'High EUI', 'Low EUI', 'High EUI % Change', 'Low EUI % Change', 'High Area', 'Low Area', 'High Area % Change', 'Low Area % Change']
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- GRAY_CHOICE = 'gray'
- GREEN_CHOICE = 'green'
- LIGHT_BLUE_CHOICE = 'light blue'
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- ORANGE_CHOICE = 'orange'
- RED_CHOICE = 'red'
- WHITE_CHOICE = 'white'
- and_filter_groups
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- color
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- compliance_label
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- exclude_filter_groups
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- get_color_display(*, field=<django.db.models.fields.CharField: color>)
- get_next_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=True, **kwargs)
- get_next_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django_extensions.db.fields.CreationDateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_modified(*, field=<django_extensions.db.fields.ModificationDateTimeField: modified>, is_next=False, **kwargs)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- indication_label
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- or_filter_groups
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- propertyview_set
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- propertyviewlabel_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- rule_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- show_in_list
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- super_organization
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- super_organization_id
- taxlotview_set
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- to_dict()
- violation_label
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- class seed.models.models.Unit(*args, **kwargs)
Bases:
Model
Unit of measure for a Column Value.
- DATE = 4
- DATETIME = 5
- DECIMAL = 2
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- FLOAT = 3
- INTEGER = 6
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- STRING = 1
- UNIT_TYPES = ((1, 'String'), (6, 'Integer'), (3, 'Float'), (4, 'Date'), (5, 'Datetime'))
- column_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- get_unit_type_display(*, field=<django.db.models.fields.IntegerField: unit_type>)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- unit_name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- unit_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
Properties
SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/SEED-platform/seed/blob/main/LICENSE.md
- class seed.models.properties.Property(*args, **kwargs)
Bases:
Model
The Property is the parent property that ties together all the views of the property. For example, if a building has multiple changes overtime, then this Property will always remain the same. The PropertyView will point to the unchanged property as the PropertyState and Property view are updated.
The property can also reference a parent property.
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- access_level_instance
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- access_level_instance_id
- analysispropertyview_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- copy_meters(source_property_id, source_persists=True)
Copies meters from a source Property to the current Property.
It’s most efficient if the persistence of the source Property’s readings aren’t needed as bulk reassignments can then be used.
The cases and logic are described in comments throughout.
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- data_loggers
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- elements
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- events
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)
- get_next_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=False, **kwargs)
- goalnote_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- historical_note
Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurant
is aReverseOneToOneDescriptor
instance.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- inventory_documents
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- meters
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- objects = <django.db.models.manager.Manager object>
- organization
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organization_id
- parent_property
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- parent_property_id
- property_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- updated
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- views
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- class seed.models.properties.PropertyAuditLog(id, organization, parent1, parent2, parent_state1, parent_state2, state, view, name, description, import_filename, record_type, created)
Bases:
Model
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_record_type_display(*, field=<django.db.models.fields.IntegerField: record_type>)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- import_filename
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- organization
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organization_id
- parent1
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- parent1_id
- parent2
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- parent2_id
- parent_state1
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- parent_state1_id
- parent_state2
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- parent_state2_id
- propertyauditlog_parent1
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- propertyauditlog_parent2
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- record_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- state
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- state_id
- view
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- view_id
- class seed.models.properties.PropertyState(*args, **kwargs)
Bases:
Model
Store a single property. This contains all the state information about the property
For property_timezone, use the pytz timezone strings. The US has the following and a full list can be created by calling pytz.all_timezones in Python:
US/Alaska
US/Aleutian
US/Arizona
US/Central
US/East-Indiana
US/Eastern
US/Hawaii
US/Indiana-Starke
US/Michigan
US/Mountain
US/Pacific
US/Samoa
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- address_line_1
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- address_line_2
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- analysispropertyview
Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurant
is aReverseOneToOneDescriptor
instance.
- audit_template_building_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- bounding_box
- building_certification
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- building_count
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- building_files
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- centroid
- city
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- clean()
Hook for doing any extra model-wide validation after clean() has been called on every field by self.clean_fields. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field defined by NON_FIELD_ERRORS.
- conditioned_floor_area
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- conditioned_floor_area_orig
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- classmethod coparent(state_id)
Return the coparent of the PropertyState. This will query the PropertyAuditLog table to determine if there is a coparent and return it if it is found. The state_id needs to be the base ID of when the original record was imported
- Parameters:
state_id – integer, state id to find coparent.
- Returns:
dict
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- custom_id_1
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- data_state
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- derived_data
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- egrid_subregion_code
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- energy_alerts
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- energy_score
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- extra_data
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- generation_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- geocoding_confidence
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_data_state_display(*, field=<django.db.models.fields.IntegerField: data_state>)
- get_merge_state_display(*, field=<django.db.models.fields.IntegerField: merge_state>)
- get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)
- get_next_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=False, **kwargs)
- get_source_type_display(*, field=<django.db.models.fields.IntegerField: source_type>)
- gross_floor_area
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- gross_floor_area_orig
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- hash_object
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history()
Return the history of the property state by parsing through the auditlog. Returns only the ids of the parent states and some descriptions.
main / / parent1 parent2
In the records, parent2 is most recent, so make sure to navigate parent two first since we are returning the data in reverse over (that is most recent changes first)
- Returns:
list, history as a list, and the main record
- home_energy_score_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- import_file
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- import_file_id
- indoor_water_use
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- indoor_wui
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- jurisdiction_property_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- latitude
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- long_lat
- longitude
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- lot_number
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- measure_set
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- measures
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- classmethod merge_relationships(merged_state, state1, state2)
Merge together the old relationships with the new.
- merge_state
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- normalized_address
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- occupied_floor_area
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- occupied_floor_area_orig
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- organization
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organization_id
- outdoor_water_use
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- owner
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- owner_address
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- owner_city_state
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- owner_email
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- owner_postal_code
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- owner_telephone
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- parent_state1
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- parent_state2
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- pm_parent_property_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- pm_property_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- postal_code
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- promote(cycle, property_id=None)
Promote the PropertyState to the view table for the given cycle
- Args:
cycle: Cycle to assign the view property_id: Optional ID of a canonical property model object to retain instead of creating a new property
- Returns:
The resulting PropertyView (note that it is not returning the PropertyState)
- property_footprint
- property_name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property_notes
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property_timezone
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- propertyauditlog_state
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- propertymeasure_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- propertyview_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- raw_access_level_instance
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- raw_access_level_instance_error
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- raw_access_level_instance_id
- recent_sale_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- release_date
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- save(*args, **kwargs)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- scenarios
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- simulation
Accessor to the related object on the reverse side of a one-to-one relation.
In the example:
class Restaurant(Model): place = OneToOneField(Place, related_name='restaurant')
Place.restaurant
is aReverseOneToOneDescriptor
instance.
- site_eui
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- site_eui_modeled
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- site_eui_modeled_orig
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- site_eui_orig
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- site_eui_weather_normalized
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- site_eui_weather_normalized_orig
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- source_eui
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- source_eui_modeled
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- source_eui_modeled_orig
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- source_eui_orig
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- source_eui_weather_normalized
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- source_eui_weather_normalized_orig
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- source_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- space_alerts
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- state
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- to_dict(fields=None, include_related_data=True)
Returns a dict version of the PropertyState, either with all fields or masked to just those requested.
- total_ghg_emissions
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- total_ghg_emissions_intensity
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- total_marginal_ghg_emissions
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- total_marginal_ghg_emissions_intensity
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- ubid
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- ubidmodel_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- updated
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- use_description
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- water_use
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- wui
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- year_built
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- year_ending
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class seed.models.properties.PropertyView(*args, **kwargs)
Bases:
Model
Similar to the old world of canonical building.
A PropertyView contains a reference to a property (which should not change) and to a cycle (time period), and a state (characteristics).
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- cycle
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- cycle_id
- gapauditlog_view
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- greenassessmentproperty_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property import_filename
Get the import file name form the audit logs
- initialize_audit_logs(**kwargs)
- labels
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- notes
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- objects = <django.db.models.manager.Manager object>
- property
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- property_id
- propertyauditlog_view
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- propertyviewlabel_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- state
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- state_id
- tax_lot_states()
Return a list of TaxLotStates associated with this PropertyView and Cycle
- Returns:
list of TaxLotStates
- tax_lot_views()
Return a list of TaxLotViews that are associated with this PropertyView and Cycle
- Returns:
list of TaxLotViews
- taxlotproperty_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- class seed.models.properties.PropertyViewLabel(id, propertyview, statuslabel, goal)
Bases:
Model
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- goal
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- goal_id
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- propertyview
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- propertyview_id
- statuslabel
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- statuslabel_id
- seed.models.properties.post_save_property(sender, instance, created, **kwargs)
- seed.models.properties.post_save_property_state(sender, **kwargs)
Generate UbidModels for a PropertyState if the ubid field is present
- seed.models.properties.post_save_property_view(sender, **kwargs)
When changing/saving the PropertyView, go ahead and touch the Property (if linked) so that the record receives an updated datetime
- seed.models.properties.pre_delete_state(sender, **kwargs)
- seed.models.properties.set_default_access_level_instance(sender, instance, **kwargs)
If ALI not set, put this Property as the root.
- seed.models.properties.sync_latitude_longitude_and_long_lat(sender, instance, **kwargs)
TaxLots
SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/SEED-platform/seed/blob/main/LICENSE.md
- class seed.models.tax_lots.TaxLot(id, organization, access_level_instance, created, updated)
Bases:
Model
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- access_level_instance
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- access_level_instance_id
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)
- get_next_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=False, **kwargs)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- organization
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organization_id
- updated
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- views
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- class seed.models.tax_lots.TaxLotAuditLog(id, organization, parent1, parent2, parent_state1, parent_state2, state, view, name, description, import_filename, record_type, created)
Bases:
Model
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- description
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_record_type_display(*, field=<django.db.models.fields.IntegerField: record_type>)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- import_filename
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- name
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- organization
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organization_id
- parent1
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- parent1_id
- parent2
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- parent2_id
- parent_state1
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- parent_state1_id
- parent_state2
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- parent_state2_id
- record_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- state
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- state_id
- taxlotauditlog_parent1
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- taxlotauditlog_parent2
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- view
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- view_id
- class seed.models.tax_lots.TaxLotState(id, import_file, organization, data_state, merge_state, raw_access_level_instance, raw_access_level_instance_error, custom_id_1, jurisdiction_tax_lot_id, block_number, district, address_line_1, address_line_2, normalized_address, city, state, postal_code, number_properties, extra_data, derived_data, hash_object, latitude, longitude, long_lat, centroid, bounding_box, taxlot_footprint, ubid, geocoding_confidence, created, updated)
Bases:
Model
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- address_line_1
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- address_line_2
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- block_number
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- bounding_box
- centroid
- city
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- classmethod coparent(state_id)
Return the coparent of the TaxLotState. This will query the TaxLotAuditLog table to determine if there is a coparent and return it if it is found. The state_id needs to be the base ID of when the original record was imported
- Parameters:
state_id – integer, state id to find coparent.
- Returns:
dict
- created
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- custom_id_1
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- data_state
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- derived_data
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- district
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- extra_data
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- geocoding_confidence
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- get_data_state_display(*, field=<django.db.models.fields.IntegerField: data_state>)
- get_merge_state_display(*, field=<django.db.models.fields.IntegerField: merge_state>)
- get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)
- get_next_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=True, **kwargs)
- get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)
- get_previous_by_updated(*, field=<django.db.models.fields.DateTimeField: updated>, is_next=False, **kwargs)
- hash_object
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- history()
Return the history of the taxlot state by parsing through the auditlog. Returns only the ids of the parent states and some descriptions.
main
/ / parent1 parent2
In the records, parent2 is most recent, so make sure to navigate parent two first since we are returning the data in reverse over (that is most recent changes first)
- Returns:
list, history as a list, and the main record
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- import_file
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- import_file_id
- jurisdiction_tax_lot_id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- latitude
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- long_lat
- longitude
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- classmethod merge_relationships(merged_state, state1, state2)
Stub to implement if merging TaxLotState relationships is needed
- merge_state
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- normalized_address
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- number_properties
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- organization
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- organization_id
- postal_code
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- promote(cycle)
Promote the TaxLotState to the view table for the given cycle
- Args:
cycle: Cycle to assign the view
- Returns:
The resulting TaxLotView (note that it is not returning the TaxLotState)
- raw_access_level_instance
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- raw_access_level_instance_error
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- raw_access_level_instance_id
- save(*args, **kwargs)
Save the current instance. Override this in a subclass if you want to control the saving process.
The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.
- state
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- taxlot_footprint
- taxlotauditlog_parent_state1
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- taxlotauditlog_parent_state2
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- taxlotauditlog_state
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- taxlotview_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- to_dict(fields=None, include_related_data=True)
Returns a dict version of the TaxLotState, either with all fields or masked to just those requested.
- ubid
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- ubidmodel_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- updated
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- class seed.models.tax_lots.TaxLotView(id, taxlot, state, cycle)
Bases:
Model
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- cycle
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- cycle_id
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- property import_filename
Get the import file name form the audit logs
- initialize_audit_logs(**kwargs)
- labels
Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.
In the example:
class Pizza(Model): toppings = ManyToManyField(Topping, related_name='pizzas')
Pizza.toppings
andTopping.pizzas
areManyToManyDescriptor
instances.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- notes
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- objects = <django.db.models.manager.Manager object>
- property_states()
Return a list of PropertyStates associated with this TaxLotView and Cycle
- Returns:
list of PropertyStates
- property_views()
Return a list of PropertyViews that are associated with this TaxLotView and Cycle
- Returns:
list of PropertyViews
- state
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- state_id
- taxlot
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
- taxlot_id
- taxlotauditlog_view
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- taxlotproperty_set
Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
- seed.models.tax_lots.post_save_taxlot_state(sender, **kwargs)
Generate UbidModels for a TaxLotState if the ubid field is present
- seed.models.tax_lots.post_save_taxlot_view(sender, **kwargs)
When changing/saving the TaxLotView, go ahead and touch the TaxLot (if linked) so that the record receives an updated datetime
- seed.models.tax_lots.set_default_access_level_instance(sender, instance, **kwargs)
If ALI not set, put this TaxLot as the root.
- seed.models.tax_lots.sync_latitude_longitude_and_long_lat(sender, instance, **kwargs)
Module contents
SEED Platform (TM), Copyright (c) Alliance for Sustainable Energy, LLC, and other contributors. See also https://github.com/SEED-platform/seed/blob/main/LICENSE.md