Models¶
Submodules¶
AuditLog¶
Columns¶
-
class
seed.models.columns.
Column
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
The name of a column for a given organization.
-
COLUMN_EXCLUDE_FIELDS
= ['id', 'source_type', 'data_state', 'import_file', 'merge_state', 'confidence', 'extra_data', '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']¶
-
DATABASE_COLUMNS
= [{'display_name': 'PM Property ID', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'pm_property_id'}, {'display_name': 'PM Parent Property ID', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'pm_parent_property_id'}, {'display_name': 'Jurisdiction Tax Lot ID', 'table_name': 'TaxLotState', 'data_type': 'string', 'column_name': 'jurisdiction_tax_lot_id'}, {'display_name': 'Jurisdiction Property ID', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'jurisdiction_property_id'}, {'display_name': 'UBID', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'ubid'}, {'display_name': 'Custom ID 1', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'custom_id_1'}, {'display_name': 'Custom ID 1', 'table_name': 'TaxLotState', 'data_type': 'string', 'column_name': 'custom_id_1'}, {'display_name': 'Address Line 1', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'address_line_1'}, {'display_name': 'Address Line 1', 'table_name': 'TaxLotState', 'data_type': 'string', 'column_name': 'address_line_1'}, {'display_name': 'Address Line 2', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'address_line_2'}, {'display_name': 'Address Line 2', 'table_name': 'TaxLotState', 'data_type': 'string', 'column_name': 'address_line_2'}, {'display_name': 'City', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'city'}, {'display_name': 'City', 'table_name': 'TaxLotState', 'data_type': 'string', 'column_name': 'city'}, {'display_name': 'State', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'state'}, {'display_name': 'State', 'table_name': 'TaxLotState', 'data_type': 'string', 'column_name': 'state'}, {'display_name': 'Normalized Address', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'normalized_address'}, {'display_name': 'Normalized Address', 'table_name': 'TaxLotState', 'data_type': 'string', 'column_name': 'normalized_address'}, {'display_name': 'Postal Code', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'postal_code'}, {'display_name': 'Postal Code', 'table_name': 'TaxLotState', 'data_type': 'string', 'column_name': 'postal_code'}, {'display_name': 'Associated Tax Lot ID', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'lot_number'}, {'display_name': 'Property Name', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'property_name'}, {'display_name': 'Latitude', 'table_name': 'PropertyState', 'data_type': 'number', 'column_name': 'latitude'}, {'display_name': 'Longitude', 'table_name': 'PropertyState', 'data_type': 'number', 'column_name': 'longitude'}, {'display_name': 'Campus', 'table_name': 'Property', 'data_type': 'boolean', 'column_name': 'campus'}, {'display_name': 'Updated', 'table_name': 'Property', 'data_type': 'datetime', 'column_name': 'updated'}, {'display_name': 'Created', 'table_name': 'Property', 'data_type': 'datetime', 'column_name': 'created'}, {'display_name': 'Updated', 'table_name': 'TaxLot', 'data_type': 'datetime', 'column_name': 'updated'}, {'display_name': 'Created', 'table_name': 'TaxLot', 'data_type': 'datetime', 'column_name': 'created'}, {'display_name': 'Gross Floor Area', 'table_name': 'PropertyState', 'data_type': 'area', 'column_name': 'gross_floor_area'}, {'display_name': 'Use Description', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'use_description'}, {'display_name': 'ENERGY STAR Score', 'table_name': 'PropertyState', 'data_type': 'integer', 'column_name': 'energy_score'}, {'display_name': 'Property Notes', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'property_notes'}, {'display_name': 'Property Type', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'property_type'}, {'display_name': 'Year Ending', 'table_name': 'PropertyState', 'data_type': 'date', 'column_name': 'year_ending'}, {'display_name': 'Owner', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'owner'}, {'display_name': 'Owner Email', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'owner_email'}, {'display_name': 'Owner Telephone', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'owner_telephone'}, {'display_name': 'Building Count', 'table_name': 'PropertyState', 'data_type': 'integer', 'column_name': 'building_count'}, {'display_name': 'Year Built', 'table_name': 'PropertyState', 'data_type': 'integer', 'column_name': 'year_built'}, {'display_name': 'Recent Sale Date', 'table_name': 'PropertyState', 'data_type': 'datetime', 'column_name': 'recent_sale_date'}, {'display_name': 'Conditioned Floor Area', 'table_name': 'PropertyState', 'data_type': 'area', 'column_name': 'conditioned_floor_area'}, {'display_name': 'Occupied Floor Area', 'table_name': 'PropertyState', 'data_type': 'area', 'column_name': 'occupied_floor_area'}, {'display_name': 'Owner Address', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'owner_address'}, {'display_name': 'Owner City/State', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'owner_city_state'}, {'display_name': 'Owner Postal Code', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'owner_postal_code'}, {'display_name': 'Home Energy Score ID', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'home_energy_score_id'}, {'display_name': 'PM Generation Date', 'table_name': 'PropertyState', 'data_type': 'datetime', 'column_name': 'generation_date'}, {'display_name': 'PM Release Date', 'table_name': 'PropertyState', 'data_type': 'datetime', 'column_name': 'release_date'}, {'display_name': 'Site EUI', 'table_name': 'PropertyState', 'data_type': 'eui', 'column_name': 'site_eui'}, {'display_name': 'Site EUI Weather Normalized', 'table_name': 'PropertyState', 'data_type': 'eui', 'column_name': 'site_eui_weather_normalized'}, {'display_name': 'Site EUI Modeled', 'table_name': 'PropertyState', 'data_type': 'eui', 'column_name': 'site_eui_modeled'}, {'display_name': 'Source EUI', 'table_name': 'PropertyState', 'data_type': 'eui', 'column_name': 'source_eui'}, {'display_name': 'Source EUI Weather Normalized', 'table_name': 'PropertyState', 'data_type': 'eui', 'column_name': 'source_eui_weather_normalized'}, {'display_name': 'Source EUI Modeled', 'table_name': 'PropertyState', 'data_type': 'eui', 'column_name': 'source_eui_modeled'}, {'display_name': 'Energy Alerts', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'energy_alerts'}, {'display_name': 'Space Alerts', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'space_alerts'}, {'display_name': 'Building Certification', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'building_certification'}, {'display_name': 'Analysis Start Time', 'table_name': 'PropertyState', 'data_type': 'datetime', 'column_name': 'analysis_start_time'}, {'display_name': 'Analysis End Time', 'table_name': 'PropertyState', 'data_type': 'datetime', 'column_name': 'analysis_end_time'}, {'display_name': 'Analysis State', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'analysis_state'}, {'display_name': 'Analysis State Message', 'table_name': 'PropertyState', 'data_type': 'string', 'column_name': 'analysis_state_message'}, {'display_name': 'Number Properties', 'table_name': 'TaxLotState', 'data_type': 'integer', 'column_name': 'number_properties'}, {'display_name': 'Block Number', 'table_name': 'TaxLotState', 'data_type': 'string', 'column_name': 'block_number'}, {'display_name': 'District', 'table_name': 'TaxLotState', 'data_type': 'string', 'column_name': 'district'}]¶
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
EXCLUDED_API_FIELDS
= ['normalized_address']¶
-
EXCLUDED_COLUMN_RETURN_FIELDS
= ['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
= ['extra_data', 'lot_number', 'normalized_address']¶
-
INTERNAL_TYPE_TO_DATA_TYPE
= {'BooleanField': 'boolean', 'CharField': 'string', 'DateField': 'date', 'DateTimeField': 'datetime', 'FloatField': 'double', 'IntegerField': 'integer', 'JSONField': 'string', 'TextField': 'string'}¶
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.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')]¶
-
SHARED_FIELD_TYPES
= ((0, 'None'), (1, 'Public'))¶
-
SHARED_NONE
= 0¶
-
SHARED_PUBLIC
= 1¶
-
UNMAPPABLE_PROPERTY_FIELDS
= ['analysis_end_time', 'analysis_start_time', 'analysis_state', 'analysis_state_message', 'campus', 'created', 'lot_number', 'updated']¶
-
UNMAPPABLE_TAXLOT_FIELDS
= ['created', 'updated']¶
-
clean
()¶
-
column_list_settings
¶ 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.
-
columnlistsettingcolumn_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
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_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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
-
display_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
enum
¶ 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.
-
enum_id
¶ 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
(*moreargs, **morekwargs)¶
-
get_next_by_modified
(*moreargs, **morekwargs)¶
-
get_previous_by_created
(*moreargs, **morekwargs)¶
-
get_previous_by_modified
(*moreargs, **morekwargs)¶
-
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
¶ 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.
-
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.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.
-
static
retrieve_all
(org_id, inventory_type=None, only_used=False)¶ 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
Returns: dict
-
static
retrieve_all_by_tuple
(org_id)¶ Return list of all columns for an organization as a tuple.
Parameters: org_id – int, Organization ID Returns: list of tuples
-
static
retrieve_db_field_name_for_hash_comparison
()¶ 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
: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:
Example: {
“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
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.
-
to_dict
()¶ Convert the column object to a dictionary
Returns: dict
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
units_pint
¶ 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.columns.
ColumnMapping
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Stores previous user-defined column mapping.
We’ll pull from this when pulling from varied, dynamic source data to present the user with previous choices for that same field in subsequent data loads.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
column_mapped
¶ 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_raw
¶ 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.
-
static
delete_mappings
(organization)¶ Delete all the mappings for an organization. Note that this will erase all the mappings so if a user views an existing Data Mapping the mappings will not show up as the actual mapping, rather, it will show up as new suggested mappings
Parameters: organization – instance, Organization Returns: int, Number of records that were deleted
-
static
get_column_mappings
(organization)¶ Returns dict of all the column mappings for an Organization’s given source type
Use this when actually performing mapping between data sources, but only call it after all of the mappings have been saved to the
ColumnMapping
table...code:
- {
- u’Wookiee’: (u’PropertyState’, u’Dothraki’, ‘DisplayName’, True), u’Ewok’: (u’TaxLotState’, u’Hattin’, ‘DisplayName’, True), u’eui’: (u’PropertyState’, u’site_eui’, ‘DisplayName’, True), u’address’: (u’TaxLotState’, u’address’, ‘DisplayName’, True)
}
Parameters: organization – instance, Organization. Returns: dict, list of dict.
-
static
get_column_mappings_by_table_name
(organization)¶ Breaks up the get_column_mappings into another layer to provide access by the table name as a key.
Parameters: organization – instance, Organization Returns: dict
-
get_source_type_display
(*moreargs, **morekwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
is_concatenated
()¶ Returns True if the ColumnMapping represents the concatenation of imported column names; else returns False.
-
is_direct
()¶ Returns True if the ColumnMapping is a direct mapping from imported column name to either a BEDES column or a previously imported column. Returns False if the ColumnMapping represents a concatenation.
-
objects
= <django.db.models.manager.Manager object>¶
-
remove_duplicates
(qs, m2m_type='column_raw')¶ Remove any other Column Mappings that use these columns.
Parameters: - qs – queryset of
Column
. These are the Columns in a M2M with this instance. - m2m_type – str, the name of the field we’re comparing against. Defaults to ‘column_raw’.
- qs – queryset of
-
save
(*args, **kwargs)¶ Overrides default model save to eliminate duplicate mappings.
Warning
Other column mappings which have the same raw_columns in them will be removed!
-
source_type
¶ 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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
to_dict
()¶ Convert the ColumnMapping object to a dictionary
Returns: dict
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
seed.models.columns.
get_column_mapping
(raw_column, organization, attr_name='column_mapped')¶ Find the ColumnMapping objects that exist in the database from a raw_column
Parameters: - raw_column – str, the column name of the raw data.
- organization – Organization inst.
- attr_name – str, name of attribute on ColumnMapping to pull out. whether we’re looking at a mapping from the perspective of a raw_column (like we do when creating a mapping), or mapped_column, (like when we’re applying that mapping).
Returns: list of mapped items, float representation of confidence.
-
seed.models.columns.
get_table_and_column_names
(column_mapping, attr_name='column_raw')¶ Turns the Column.column_names into a serializable list of str.
-
seed.models.columns.
validate_model
(sender, **kwargs)¶
Cycles¶
-
class
seed.models.cycles.
Cycle
(id, organization, user, name, start, end, created)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
created
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
end
¶ 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
(*moreargs, **morekwargs)¶
-
get_next_by_end
(*moreargs, **morekwargs)¶
-
get_next_by_start
(*moreargs, **morekwargs)¶
-
classmethod
get_or_create_default
(organization)¶
-
get_previous_by_created
(*moreargs, **morekwargs)¶
-
get_previous_by_end
(*moreargs, **morekwargs)¶
-
get_previous_by_start
(*moreargs, **morekwargs)¶
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
Joins¶
Generic Models¶
-
class
seed.models.models.
AttributeOption
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Holds a single conflicting value for a BuildingSnapshot attribute.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
building_variant
¶ 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.
-
building_variant_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_value_source_display
(*moreargs, **morekwargs)¶
-
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>¶
-
value
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
value_source
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
seed.models.models.
BuildingAttributeVariant
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Place to keep the options of BuildingSnapshot attribute variants.
When we want to select which source’s values should sit in the Canonical Building’s position, we need to draw from a set of options determined during the matching phase. We should only have one ‘Variant’ container per field_name, per snapshot.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
building_snapshot
¶ 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.
-
building_snapshot_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
field_name
¶ 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.
-
objects
= <django.db.models.manager.Manager object>¶
-
options
¶ 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.
-
exception
-
class
seed.models.models.
Compliance
(id, created, modified, compliance_type, start_date, end_date, deadline_date, project)¶ Bases:
django_extensions.db.models.TimeStampedModel
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
compliance_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
deadline_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
end_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_compliance_type_display
(*moreargs, **morekwargs)¶
-
get_next_by_created
(*moreargs, **morekwargs)¶
-
get_next_by_modified
(*moreargs, **morekwargs)¶
-
get_previous_by_created
(*moreargs, **morekwargs)¶
-
get_previous_by_modified
(*moreargs, **morekwargs)¶
-
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>¶
-
project
¶ 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.
-
project_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
start_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
to_dict
()¶
-
exception
-
class
seed.models.models.
CustomBuildingHeaders
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Specify custom building header mapping for display.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
building_headers
¶ 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.
-
objects
= <seed.managers.json.JsonManager object>¶
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
seed.models.models.
Enum
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Defines a set of enumerated types for a column.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
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.
-
enum_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
enum_values
¶ 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.
-
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>¶
-
exception
-
class
seed.models.models.
EnumValue
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Individual Enumerated Type values.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
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>¶
-
value_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
values
¶ 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
-
class
seed.models.models.
StatusLabel
(id, created, modified, name, color, super_organization)¶ Bases:
django_extensions.db.models.TimeStampedModel
-
BLUE_CHOICE
= 'blue'¶
-
COLOR_CHOICES
= (('red', u'red'), ('blue', u'blue'), ('light blue', u'light blue'), ('green', u'green'), ('white', u'white'), ('orange', u'orange'), ('gray', u'gray'))¶
-
DEFAULT_LABELS
= ['Residential', 'Non-Residential', 'Violation', 'Compliant', 'Missing Data', 'Questionable Report', 'Update Bldg Info', 'Call', 'Email', 'High EUI', 'Low EUI', 'Exempted', 'Extension', 'Change of Ownership']¶
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
GRAY_CHOICE
= 'gray'¶
-
GREEN_CHOICE
= 'green'¶
-
LIGHT_BLUE_CHOICE
= 'light blue'¶
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
ORANGE_CHOICE
= 'orange'¶
-
RED_CHOICE
= 'red'¶
-
WHITE_CHOICE
= 'white'¶
-
canonicalbuilding_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.
-
color
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_color_display
(*moreargs, **morekwargs)¶
-
get_next_by_created
(*moreargs, **morekwargs)¶
-
get_next_by_modified
(*moreargs, **morekwargs)¶
-
get_previous_by_created
(*moreargs, **morekwargs)¶
-
get_previous_by_modified
(*moreargs, **morekwargs)¶
-
id
¶ 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>¶
-
property_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.
-
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.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
taxlot_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
()¶
-
-
class
seed.models.models.
Unit
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Unit of measure for a Column Value.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
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
(*moreargs, **morekwargs)¶
-
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.
-
exception
-
seed.models.models.
get_ancestors
(building)¶ gets all the non-raw, non-composite ancestors of a building
Recursive function to traverse the tree upward.
Parameters: building – BuildingSnapshot inst. Returns: list of BuildingSnapshot inst., ancestors of building source_type { 2: ASSESSED_BS, 3: PORTFOLIO_BS, 4: COMPOSITE_BS, 6: GREEN_BUTTON_BS }
Projects¶
-
class
seed.models.projects.
Project
(id, created, modified, name, slug, owner, last_modified_by, super_organization, description, status)¶ Bases:
django_extensions.db.models.TimeStampedModel
-
ACTIVE_STATUS
= 1¶
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
INACTIVE_STATUS
= 0¶
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
PROJECT_NAME_MAX_LENGTH
= 255¶
-
STATUS_CHOICES
= ((0, u'Inactive'), (1, u'Active'))¶
-
adding_buildings_status_percentage_cache_key
¶
-
compliance_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.
-
description
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
get_compliance
()¶
-
get_next_by_created
(*moreargs, **morekwargs)¶
-
get_next_by_modified
(*moreargs, **morekwargs)¶
-
get_previous_by_created
(*moreargs, **morekwargs)¶
-
get_previous_by_modified
(*moreargs, **morekwargs)¶
-
get_status_display
(*moreargs, **morekwargs)¶
-
has_compliance
¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
last_modified_by
¶ 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.
-
last_modified_by_id
¶ 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
¶ For compliance with organization names in new data model.
-
owner
¶ 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.
-
owner_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
project_property_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.
-
project_taxlot_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.
-
property_count
¶
-
property_views
¶ 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.
-
removing_buildings_status_percentage_cache_key
¶
-
slug
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
status
¶ 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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
taxlot_count
¶
-
taxlot_views
¶ 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
()¶
-
-
class
seed.models.projects.
ProjectPropertyView
(id, created, modified, property_view, project, compliant, approved_date, approver)¶ Bases:
django_extensions.db.models.TimeStampedModel
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
approved_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
approver
¶ 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.
-
approver_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
compliant
¶ 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
(*moreargs, **morekwargs)¶
-
get_next_by_modified
(*moreargs, **morekwargs)¶
-
get_previous_by_created
(*moreargs, **morekwargs)¶
-
get_previous_by_modified
(*moreargs, **morekwargs)¶
-
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>¶
-
project
¶ 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.
-
project_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property_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.
-
property_view_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
seed.models.projects.
ProjectTaxLotView
(id, created, modified, taxlot_view, project, compliant, approved_date, approver)¶ Bases:
django_extensions.db.models.TimeStampedModel
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
approved_date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
approver
¶ 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.
-
approver_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
compliant
¶ 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
(*moreargs, **morekwargs)¶
-
get_next_by_modified
(*moreargs, **morekwargs)¶
-
get_previous_by_created
(*moreargs, **morekwargs)¶
-
get_previous_by_modified
(*moreargs, **morekwargs)¶
-
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>¶
-
project
¶ 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.
-
project_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
taxlot_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.
-
taxlot_view_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
Properties¶
-
class
seed.models.properties.
Property
(*args, **kwargs)¶ Bases:
django.db.models.base.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.
If the property can be a campus. The property can also reference a parent property.
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
campus
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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
(*moreargs, **morekwargs)¶
-
get_next_by_updated
(*moreargs, **morekwargs)¶
-
get_previous_by_created
(*moreargs, **morekwargs)¶
-
get_previous_by_updated
(*moreargs, **morekwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.
-
exception
-
class
seed.models.properties.
PropertyAuditLog
(id, organization, parent1, parent2, parent_state1, parent_state2, state, view, name, description, import_filename, record_type, created)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.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
(*moreargs, **morekwargs)¶
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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
¶ 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 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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
seed.models.properties.
PropertyState
(*args, **kwargs)¶ Bases:
django.db.models.base.Model
Store a single property. This contains all the state information about the property
-
ANALYSIS_STATE_COMPLETED
= 2¶
-
ANALYSIS_STATE_FAILED
= 3¶
-
ANALYSIS_STATE_NOT_STARTED
= 0¶
-
ANALYSIS_STATE_QUEUED
= 4¶
-
ANALYSIS_STATE_STARTED
= 1¶
-
ANALYSIS_STATE_TYPES
= ((0, u'Not Started'), (4, u'Queued'), (1, u'Started'), (2, u'Completed'), (3, u'Failed'))¶
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.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.
-
analysis_end_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
analysis_start_time
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
analysis_state
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
analysis_state_message
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.
-
city
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
clean
()¶
-
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.
-
confidence
¶ 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
-
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.
-
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.
-
get_analysis_state_display
(*moreargs, **morekwargs)¶
-
get_data_state_display
(*moreargs, **morekwargs)¶
-
get_merge_state_display
(*moreargs, **morekwargs)¶
-
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.
-
history
()¶ Return the history of the property state by parsing through the auditlog. Returns only the ids of the parent states and some descriptions.
master / / parent1 parent2In 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 master 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
¶ 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.
-
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
¶ 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_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_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.
-
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)¶
-
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.
-
ubid
¶ 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.
-
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:
django.db.models.base.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:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.
-
import_filename
¶ Get the import file name form the audit logs
-
initialize_audit_logs
(**kwargs)¶
-
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.
-
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>¶
-
project_property_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.
-
project_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.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.
-
exception
-
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)¶
TaxLots¶
-
class
seed.models.tax_lots.
TaxLot
(id, organization, created, updated)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
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
(*moreargs, **morekwargs)¶
-
get_next_by_updated
(*moreargs, **morekwargs)¶
-
get_previous_by_created
(*moreargs, **morekwargs)¶
-
get_previous_by_updated
(*moreargs, **morekwargs)¶
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.
-
exception
-
class
seed.models.tax_lots.
TaxLotAuditLog
(id, organization, parent1, parent2, parent_state1, parent_state2, state, view, name, description, import_filename, record_type, created)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.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
(*moreargs, **morekwargs)¶
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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
¶ 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 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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
seed.models.tax_lots.
TaxLotState
(id, confidence, import_file, organization, data_state, merge_state, 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)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.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.
-
city
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
confidence
¶ 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
-
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.
-
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.
-
get_data_state_display
(*moreargs, **morekwargs)¶
-
get_merge_state_display
(*moreargs, **morekwargs)¶
-
history
()¶ Return the history of the taxlot state by parsing through the auditlog. Returns only the ids of the parent states and some descriptions.
master / / parent1 parent2In 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 master 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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.
-
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
¶ 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)¶ 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)
-
save
(*args, **kwargs)¶
-
state
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.
-
exception
-
class
seed.models.tax_lots.
TaxLotView
(id, taxlot, state, cycle)¶ Bases:
django.db.models.base.Model
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.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
¶ 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_filename
¶ Get the import file name form the audit logs
-
initialize_audit_logs
(**kwargs)¶
-
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>¶
-
project_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.
-
project_taxlot_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.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
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.
-
exception
-
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