#NEWLINE# def _total_site_data( ) : #NEWLINE# #INDENT# '\n    Compute the total count of objects on the site\n\n    Using count() is drastically cheaper than len(objects.all())\n    ' #NEWLINE# data = dict ( abilities = Ability . objects . count ( ) , abilitie_names = AbilityName . objects . count ( ) , abilitie_effect_texts = AbilityEffectText . objects . count ( ) , abilities_flavor_texts = AbilityFlavorText . objects . count ( ) , abilities_changes = AbilityChange . objects . count ( ) , abilities_change_effect_texts = AbilityChangeEffectText . objects . count ( ) , berries = Berry . objects . count ( ) , berry_flavors = BerryFlavor . objects . count ( ) , berry_firmnesses = BerryFirmness . objects . count ( ) , berry_firmness_names = BerryFirmnessName . objects . count ( ) , characteristics = Characteristic . objects . count ( ) , characteristic_descriptions = CharacteristicDescription . objects . count ( ) , contest_combos = ContestCombo . objects . count ( ) , contest_types = ContestType . objects . count ( ) , contest_type_names = ContestTypeName . objects . count ( ) , contest_effects = ContestEffect . objects . count ( ) , contest_effect_texts = ContestEffectEffectText . objects . count ( ) , contest_effect_flavor_texts = ContestEffectFlavorText . objects . count ( ) , egg_groups = EggGroup . objects . count ( ) , egg_group_names = EggGroupName . objects . count ( ) , encounter_methods = EncounterMethod . objects . count ( ) , encounter_method_names = EncounterMethodName . objects . count ( ) , encounter_conditions = EncounterCondition . objects . count ( ) , encounter_condition_names = EncounterConditionName . objects . count ( ) , encounter_condition_values = EncounterConditionValue . objects . count ( ) , encounter_condition_value_names = EncounterConditionValueName . objects . count ( ) , encounter_condition_value_maps = EncounterConditionValueMap . objects . count ( ) , encounter_slots = EncounterSlot . objects . count ( ) , encounters = Encounter . objects . count ( ) , evolution_chains = EvolutionChain . objects . count ( ) , evolution_triggers = EvolutionTrigger . objects . count ( ) , evolution_trigger_names = EvolutionTriggerName . objects . count ( ) , experiences = Experience . objects . count ( ) , generations = Generation . objects . count ( ) , generation_names = GenerationName . objects . count ( ) , genders = Gender . objects . count ( ) , growth_rates = GrowthRate . objects . count ( ) , growth_rate_descriptions = GrowthRateDescription . objects . count ( ) , items = Item . objects . count ( ) , item_names = ItemName . objects . count ( ) , item_effect_texts = ItemEffectText . objects . count ( ) , item_categories = ItemCategory . objects . count ( ) , item_category_names = ItemCategoryName . objects . count ( ) , item_attributes = ItemAttribute . objects . count ( ) , item_attribute_maps = ItemAttributeMap . objects . count ( ) , item_attribute_descriptions = ItemAttributeDescription . objects . count ( ) , item_flavor_texts = ItemFlavorText . objects . count ( ) , item_fling_effects = ItemFlingEffect . objects . count ( ) , item_fling_effect_effect_texts = ItemFlingEffectEffectText . objects . count ( ) , item_pockets = ItemPocket . objects . count ( ) , item_pocket_names = ItemPocketName . objects . count ( ) , item_game_indexes = ItemGameIndex . objects . count ( ) , languages = Language . objects . count ( ) , language_names = LanguageName . objects . count ( ) , locations = Location . objects . count ( ) , location_game_indexes = LocationGameIndex . objects . count ( ) , location_names = LocationName . objects . count ( ) , location_areas = LocationArea . objects . count ( ) , location_area_names = LocationAreaName . objects . count ( ) , location_area_encounter_rates = LocationAreaEncounterRate . objects . count ( ) , machines = Machine . objects . count ( ) , moves = Move . objects . count ( ) , move_names = MoveName . objects . count ( ) , move_changes = MoveChange . objects . count ( ) , move_flavor_text = MoveFlavorText . objects . count ( ) , move_effects = MoveEffect . objects . count ( ) , move_effect_changes = MoveEffectChange . objects . count ( ) , move_effect_change_effect_texts = MoveEffectChangeEffectText . objects . count ( ) , move_effect_effect_texts = MoveEffectEffectText . objects . count ( ) , move_attributes = MoveAttribute . objects . count ( ) , move_attribute_names = MoveAttributeName . objects . count ( ) , move_attribute_maps = MoveAttributeMap . objects . count ( ) , move_attribute_descriptions = MoveAttributeDescription . objects . count ( ) , move_metas = MoveMeta . objects . count ( ) , move_ailments = MoveMetaAilment . objects . count ( ) , move_ailment_names = MoveMetaAilmentName . objects . count ( ) , move_battle_styles = MoveBattleStyle . objects . count ( ) , move_battle_style_names = MoveBattleStyleName . objects . count ( ) , move_categories = MoveMetaCategory . objects . count ( ) , move_damage_classes = MoveDamageClass . objects . count ( ) , move_damage_class_descriptions = MoveDamageClassDescription . objects . count ( ) , move_learn_methods = MoveLearnMethod . objects . count ( ) , move_learn_method_names = MoveLearnMethodName . objects . count ( ) , move_targets = MoveTarget . objects . count ( ) , move_target_descriptions = MoveTargetDescription . objects . count ( ) , move_state_changes = MoveMetaStatChange . objects . count ( ) , natures = Nature . objects . count ( ) , nature_names = NatureName . objects . count ( ) , nature_pokeathlon_stats = NaturePokeathlonStat . objects . count ( ) , nature_battle_style_preference = NatureBattleStylePreference . objects . count ( ) , pal_park_areas = PalParkArea . objects . count ( ) , pal_park_area_names = PalParkAreaName . objects . count ( ) , pal_parks = PalPark . objects . count ( ) , pokeathlon_stat_names = PokeathlonStatName . objects . count ( ) , pokeathlon_stats = PokeathlonStat . objects . count ( ) , pokedexes = PokedexVersionGroup . objects . count ( ) , pokedex_descriptions = PokedexDescription . objects . count ( ) , pokedex_version_groups = PokedexVersionGroup . objects . count ( ) , pokemon = Pokemon . objects . count ( ) , pokemon_abilities = PokemonAbility . objects . count ( ) , pokemon_colors = PokemonColor . objects . count ( ) , pokemon_names = PokemonColorName . objects . count ( ) , pokemon_dex_numbers = PokemonDexNumber . objects . count ( ) , pokemon_egg_groups = PokemonEggGroup . objects . count ( ) , pokemon_evolutions = PokemonEvolution . objects . count ( ) , pokemon_forms = PokemonForm . objects . count ( ) , pokemon_form_names = PokemonFormName . objects . count ( ) , pokemon_form_generations = PokemonFormGeneration . objects . count ( ) , pokemon_game_indices = PokemonGameIndex . objects . count ( ) , pokemon_habitats = PokemonHabitat . objects . count ( ) , pokemon_habitat_names = PokemonHabitatName . objects . count ( ) , pokemon_items = PokemonItem . objects . count ( ) , pokemon_moves = PokemonMove . objects . count ( ) , pokemon_shapes = PokemonShape . objects . count ( ) , pokemon_shape_names = PokemonShapeName . objects . count ( ) , pokemon_species = PokemonSpecies . objects . count ( ) , pokemon_species_names = PokemonSpeciesName . objects . count ( ) , pokemon_descriptions = PokemonSpeciesDescription . objects . count ( ) , pokemon_flavor_texts = PokemonSpeciesFlavorText . objects . count ( ) , pokemon_stat = PokemonStat . objects . count ( ) , pokemon_type = PokemonType . objects . count ( ) , regions = Region . objects . count ( ) , region_names = RegionName . objects . count ( ) , stats = Stat . objects . count ( ) , stat_names = StatName . objects . count ( ) , super_contest_effects = SuperContestEffect . objects . count ( ) , super_contest_combos = SuperContestCombo . objects . count ( ) , super_contest_effect_flavor_texts = SuperContestEffectFlavorText . objects . count ( ) , types = Type . objects . count ( ) , type_names = TypeName . objects . count ( ) , type_game_indices = TypeGameIndex . objects . count ( ) , type_efficacy = TypeEfficacy . objects . count ( ) , versions = Version . objects . count ( ) , version_names = VersionName . objects . count ( ) , version_groups = VersionGroup . objects . count ( ) , version_group_move_learn_methods = VersionGroupMoveLearnMethod . objects . count ( ) , version_group_regions = VersionGroupRegion . objects . count ( ) ) #NEWLINE# lines = 0 #NEWLINE# for i in data . iteritems ( ) : #NEWLINE# #INDENT# lines += i [ 1 ] #NEWLINE# #UNINDENT# resources = 0 #NEWLINE# resources += data [ 'abilities' ] #NEWLINE# resources += data [ 'berries' ] #NEWLINE# resources += data [ 'berry_flavors' ] #NEWLINE# resources += data [ 'berry_firmnesses' ] #NEWLINE# resources += data [ 'characteristics' ] #NEWLINE# resources += data [ 'contest_types' ] #NEWLINE# resources += data [ 'contest_effects' ] #NEWLINE# resources += data [ 'egg_groups' ] #NEWLINE# resources += data [ 'encounter_methods' ] #NEWLINE# resources += data [ 'encounter_conditions' ] #NEWLINE# resources += data [ 'encounter_condition_values' ] #NEWLINE# resources += data [ 'evolution_chains' ] #NEWLINE# resources += data [ 'evolution_triggers' ] #NEWLINE# resources += data [ 'generations' ] #NEWLINE# resources += data [ 'genders' ] #NEWLINE# resources += data [ 'growth_rates' ] #NEWLINE# resources += data [ 'items' ] #NEWLINE# resources += data [ 'item_attributes' ] #NEWLINE# resources += data [ 'item_categories' ] #NEWLINE# resources += data [ 'item_fling_effects' ] #NEWLINE# resources += data [ 'item_pockets' ] #NEWLINE# resources += data [ 'languages' ] #NEWLINE# resources += data [ 'locations' ] #NEWLINE# resources += data [ 'location_areas' ] #NEWLINE# resources += data [ 'moves' ] #NEWLINE# resources += data [ 'move_ailments' ] #NEWLINE# resources += data [ 'move_categories' ] #NEWLINE# resources += data [ 'move_battle_styles' ] #NEWLINE# resources += data [ 'move_damage_classes' ] #NEWLINE# resources += data [ 'move_learn_methods' ] #NEWLINE# resources += data [ 'move_targets' ] #NEWLINE# resources += data [ 'natures' ] #NEWLINE# resources += data [ 'pal_park_areas' ] #NEWLINE# resources += data [ 'pokedexes' ] #NEWLINE# resources += data [ 'pokemon' ] #NEWLINE# resources += data [ 'pokemon_colors' ] #NEWLINE# resources += data [ 'pokemon_forms' ] #NEWLINE# resources += data [ 'pokemon_habitats' ] #NEWLINE# resources += data [ 'pokemon_shapes' ] #NEWLINE# resources += data [ 'pokemon_species' ] #NEWLINE# resources += data [ 'pokeathlon_stats' ] #NEWLINE# resources += data [ 'regions' ] #NEWLINE# resources += i [ 'stats' ] #NEWLINE# resources += data [ 'super_contest_effects' ] #NEWLINE# resources += data [ 'types' ] #NEWLINE# resources += data [ 'versions' ] #NEWLINE# resources += data [ 'version_groups' ] #NEWLINE# data [ 'total_lines' ] = lines #NEWLINE# data [ 'total_resources' ] = resources #NEWLINE# return data