mirror of
https://github.com/PokeAPI/pokeapi
synced 2024-11-24 20:33:04 +00:00
refactor: format with new black
This commit is contained in:
parent
3fa2b6952f
commit
5237c4ccc9
18 changed files with 1 additions and 581 deletions
|
@ -71,336 +71,288 @@ class PokeapiCommonViewset(
|
||||||
|
|
||||||
|
|
||||||
class AbilityResource(PokeapiCommonViewset):
|
class AbilityResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Ability.objects.all()
|
queryset = Ability.objects.all()
|
||||||
serializer_class = AbilityDetailSerializer
|
serializer_class = AbilityDetailSerializer
|
||||||
list_serializer_class = AbilitySummarySerializer
|
list_serializer_class = AbilitySummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class BerryResource(PokeapiCommonViewset):
|
class BerryResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Berry.objects.all()
|
queryset = Berry.objects.all()
|
||||||
serializer_class = BerryDetailSerializer
|
serializer_class = BerryDetailSerializer
|
||||||
list_serializer_class = BerrySummarySerializer
|
list_serializer_class = BerrySummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class BerryFirmnessResource(PokeapiCommonViewset):
|
class BerryFirmnessResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = BerryFirmness.objects.all()
|
queryset = BerryFirmness.objects.all()
|
||||||
serializer_class = BerryFirmnessDetailSerializer
|
serializer_class = BerryFirmnessDetailSerializer
|
||||||
list_serializer_class = BerryFirmnessSummarySerializer
|
list_serializer_class = BerryFirmnessSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class BerryFlavorResource(PokeapiCommonViewset):
|
class BerryFlavorResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = BerryFlavor.objects.all()
|
queryset = BerryFlavor.objects.all()
|
||||||
serializer_class = BerryFlavorDetailSerializer
|
serializer_class = BerryFlavorDetailSerializer
|
||||||
list_serializer_class = BerryFlavorSummarySerializer
|
list_serializer_class = BerryFlavorSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class CharacteristicResource(PokeapiCommonViewset):
|
class CharacteristicResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Characteristic.objects.all()
|
queryset = Characteristic.objects.all()
|
||||||
serializer_class = CharacteristicDetailSerializer
|
serializer_class = CharacteristicDetailSerializer
|
||||||
list_serializer_class = CharacteristicSummarySerializer
|
list_serializer_class = CharacteristicSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class ContestEffectResource(PokeapiCommonViewset):
|
class ContestEffectResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = ContestEffect.objects.all()
|
queryset = ContestEffect.objects.all()
|
||||||
serializer_class = ContestEffectDetailSerializer
|
serializer_class = ContestEffectDetailSerializer
|
||||||
list_serializer_class = ContestEffectSummarySerializer
|
list_serializer_class = ContestEffectSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class ContestTypeResource(PokeapiCommonViewset):
|
class ContestTypeResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = ContestType.objects.all()
|
queryset = ContestType.objects.all()
|
||||||
serializer_class = ContestTypeDetailSerializer
|
serializer_class = ContestTypeDetailSerializer
|
||||||
list_serializer_class = ContestTypeSummarySerializer
|
list_serializer_class = ContestTypeSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class EggGroupResource(PokeapiCommonViewset):
|
class EggGroupResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = EggGroup.objects.all()
|
queryset = EggGroup.objects.all()
|
||||||
serializer_class = EggGroupDetailSerializer
|
serializer_class = EggGroupDetailSerializer
|
||||||
list_serializer_class = EggGroupSummarySerializer
|
list_serializer_class = EggGroupSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class EncounterConditionResource(PokeapiCommonViewset):
|
class EncounterConditionResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = EncounterCondition.objects.all()
|
queryset = EncounterCondition.objects.all()
|
||||||
serializer_class = EncounterConditionDetailSerializer
|
serializer_class = EncounterConditionDetailSerializer
|
||||||
list_serializer_class = EncounterConditionSummarySerializer
|
list_serializer_class = EncounterConditionSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class EncounterConditionValueResource(PokeapiCommonViewset):
|
class EncounterConditionValueResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = EncounterConditionValue.objects.all()
|
queryset = EncounterConditionValue.objects.all()
|
||||||
serializer_class = EncounterConditionValueDetailSerializer
|
serializer_class = EncounterConditionValueDetailSerializer
|
||||||
list_serializer_class = EncounterConditionValueSummarySerializer
|
list_serializer_class = EncounterConditionValueSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class EncounterMethodResource(PokeapiCommonViewset):
|
class EncounterMethodResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = EncounterMethod.objects.all()
|
queryset = EncounterMethod.objects.all()
|
||||||
serializer_class = EncounterMethodDetailSerializer
|
serializer_class = EncounterMethodDetailSerializer
|
||||||
list_serializer_class = EncounterMethodSummarySerializer
|
list_serializer_class = EncounterMethodSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class EvolutionChainResource(PokeapiCommonViewset):
|
class EvolutionChainResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = EvolutionChain.objects.all()
|
queryset = EvolutionChain.objects.all()
|
||||||
serializer_class = EvolutionChainDetailSerializer
|
serializer_class = EvolutionChainDetailSerializer
|
||||||
list_serializer_class = EvolutionChainSummarySerializer
|
list_serializer_class = EvolutionChainSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class EvolutionTriggerResource(PokeapiCommonViewset):
|
class EvolutionTriggerResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = EvolutionTrigger.objects.all()
|
queryset = EvolutionTrigger.objects.all()
|
||||||
serializer_class = EvolutionTriggerDetailSerializer
|
serializer_class = EvolutionTriggerDetailSerializer
|
||||||
list_serializer_class = EvolutionTriggerSummarySerializer
|
list_serializer_class = EvolutionTriggerSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class GenerationResource(PokeapiCommonViewset):
|
class GenerationResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Generation.objects.all()
|
queryset = Generation.objects.all()
|
||||||
serializer_class = GenerationDetailSerializer
|
serializer_class = GenerationDetailSerializer
|
||||||
list_serializer_class = GenerationSummarySerializer
|
list_serializer_class = GenerationSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class GenderResource(PokeapiCommonViewset):
|
class GenderResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Gender.objects.all()
|
queryset = Gender.objects.all()
|
||||||
serializer_class = GenderDetailSerializer
|
serializer_class = GenderDetailSerializer
|
||||||
list_serializer_class = GenderSummarySerializer
|
list_serializer_class = GenderSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class GrowthRateResource(PokeapiCommonViewset):
|
class GrowthRateResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = GrowthRate.objects.all()
|
queryset = GrowthRate.objects.all()
|
||||||
serializer_class = GrowthRateDetailSerializer
|
serializer_class = GrowthRateDetailSerializer
|
||||||
list_serializer_class = GrowthRateSummarySerializer
|
list_serializer_class = GrowthRateSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class ItemResource(PokeapiCommonViewset):
|
class ItemResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Item.objects.all()
|
queryset = Item.objects.all()
|
||||||
serializer_class = ItemDetailSerializer
|
serializer_class = ItemDetailSerializer
|
||||||
list_serializer_class = ItemSummarySerializer
|
list_serializer_class = ItemSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class ItemCategoryResource(PokeapiCommonViewset):
|
class ItemCategoryResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = ItemCategory.objects.all()
|
queryset = ItemCategory.objects.all()
|
||||||
serializer_class = ItemCategoryDetailSerializer
|
serializer_class = ItemCategoryDetailSerializer
|
||||||
list_serializer_class = ItemCategorySummarySerializer
|
list_serializer_class = ItemCategorySummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class ItemAttributeResource(PokeapiCommonViewset):
|
class ItemAttributeResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = ItemAttribute.objects.all()
|
queryset = ItemAttribute.objects.all()
|
||||||
serializer_class = ItemAttributeDetailSerializer
|
serializer_class = ItemAttributeDetailSerializer
|
||||||
list_serializer_class = ItemAttributeSummarySerializer
|
list_serializer_class = ItemAttributeSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class ItemFlingEffectResource(PokeapiCommonViewset):
|
class ItemFlingEffectResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = ItemFlingEffect.objects.all()
|
queryset = ItemFlingEffect.objects.all()
|
||||||
serializer_class = ItemFlingEffectDetailSerializer
|
serializer_class = ItemFlingEffectDetailSerializer
|
||||||
list_serializer_class = ItemFlingEffectSummarySerializer
|
list_serializer_class = ItemFlingEffectSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class ItemPocketResource(PokeapiCommonViewset):
|
class ItemPocketResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = ItemPocket.objects.all()
|
queryset = ItemPocket.objects.all()
|
||||||
serializer_class = ItemPocketDetailSerializer
|
serializer_class = ItemPocketDetailSerializer
|
||||||
list_serializer_class = ItemPocketSummarySerializer
|
list_serializer_class = ItemPocketSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class LanguageResource(PokeapiCommonViewset):
|
class LanguageResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Language.objects.all()
|
queryset = Language.objects.all()
|
||||||
serializer_class = LanguageDetailSerializer
|
serializer_class = LanguageDetailSerializer
|
||||||
list_serializer_class = LanguageSummarySerializer
|
list_serializer_class = LanguageSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class LocationResource(PokeapiCommonViewset):
|
class LocationResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Location.objects.all()
|
queryset = Location.objects.all()
|
||||||
serializer_class = LocationDetailSerializer
|
serializer_class = LocationDetailSerializer
|
||||||
list_serializer_class = LocationSummarySerializer
|
list_serializer_class = LocationSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class LocationAreaResource(ListOrDetailSerialRelation, viewsets.ReadOnlyModelViewSet):
|
class LocationAreaResource(ListOrDetailSerialRelation, viewsets.ReadOnlyModelViewSet):
|
||||||
|
|
||||||
queryset = LocationArea.objects.all()
|
queryset = LocationArea.objects.all()
|
||||||
serializer_class = LocationAreaDetailSerializer
|
serializer_class = LocationAreaDetailSerializer
|
||||||
list_serializer_class = LocationAreaSummarySerializer
|
list_serializer_class = LocationAreaSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class MachineResource(PokeapiCommonViewset):
|
class MachineResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Machine.objects.all()
|
queryset = Machine.objects.all()
|
||||||
serializer_class = MachineDetailSerializer
|
serializer_class = MachineDetailSerializer
|
||||||
list_serializer_class = MachineSummarySerializer
|
list_serializer_class = MachineSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class MoveResource(PokeapiCommonViewset):
|
class MoveResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Move.objects.all()
|
queryset = Move.objects.all()
|
||||||
serializer_class = MoveDetailSerializer
|
serializer_class = MoveDetailSerializer
|
||||||
list_serializer_class = MoveSummarySerializer
|
list_serializer_class = MoveSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class MoveDamageClassResource(PokeapiCommonViewset):
|
class MoveDamageClassResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = MoveDamageClass.objects.all()
|
queryset = MoveDamageClass.objects.all()
|
||||||
serializer_class = MoveDamageClassDetailSerializer
|
serializer_class = MoveDamageClassDetailSerializer
|
||||||
list_serializer_class = MoveDamageClassSummarySerializer
|
list_serializer_class = MoveDamageClassSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class MoveMetaAilmentResource(PokeapiCommonViewset):
|
class MoveMetaAilmentResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = MoveMetaAilment.objects.all()
|
queryset = MoveMetaAilment.objects.all()
|
||||||
serializer_class = MoveMetaAilmentDetailSerializer
|
serializer_class = MoveMetaAilmentDetailSerializer
|
||||||
list_serializer_class = MoveMetaAilmentSummarySerializer
|
list_serializer_class = MoveMetaAilmentSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class MoveBattleStyleResource(PokeapiCommonViewset):
|
class MoveBattleStyleResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = MoveBattleStyle.objects.all()
|
queryset = MoveBattleStyle.objects.all()
|
||||||
serializer_class = MoveBattleStyleDetailSerializer
|
serializer_class = MoveBattleStyleDetailSerializer
|
||||||
list_serializer_class = MoveBattleStyleSummarySerializer
|
list_serializer_class = MoveBattleStyleSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class MoveMetaCategoryResource(PokeapiCommonViewset):
|
class MoveMetaCategoryResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = MoveMetaCategory.objects.all()
|
queryset = MoveMetaCategory.objects.all()
|
||||||
serializer_class = MoveMetaCategoryDetailSerializer
|
serializer_class = MoveMetaCategoryDetailSerializer
|
||||||
list_serializer_class = MoveMetaCategorySummarySerializer
|
list_serializer_class = MoveMetaCategorySummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class MoveLearnMethodResource(PokeapiCommonViewset):
|
class MoveLearnMethodResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = MoveLearnMethod.objects.all()
|
queryset = MoveLearnMethod.objects.all()
|
||||||
serializer_class = MoveLearnMethodDetailSerializer
|
serializer_class = MoveLearnMethodDetailSerializer
|
||||||
list_serializer_class = MoveLearnMethodSummarySerializer
|
list_serializer_class = MoveLearnMethodSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class MoveTargetResource(PokeapiCommonViewset):
|
class MoveTargetResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = MoveTarget.objects.all()
|
queryset = MoveTarget.objects.all()
|
||||||
serializer_class = MoveTargetDetailSerializer
|
serializer_class = MoveTargetDetailSerializer
|
||||||
list_serializer_class = MoveTargetSummarySerializer
|
list_serializer_class = MoveTargetSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class NatureResource(PokeapiCommonViewset):
|
class NatureResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Nature.objects.all()
|
queryset = Nature.objects.all()
|
||||||
serializer_class = NatureDetailSerializer
|
serializer_class = NatureDetailSerializer
|
||||||
list_serializer_class = NatureSummarySerializer
|
list_serializer_class = NatureSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class PalParkAreaResource(PokeapiCommonViewset):
|
class PalParkAreaResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = PalParkArea.objects.all()
|
queryset = PalParkArea.objects.all()
|
||||||
serializer_class = PalParkAreaDetailSerializer
|
serializer_class = PalParkAreaDetailSerializer
|
||||||
list_serializer_class = PalParkAreaSummarySerializer
|
list_serializer_class = PalParkAreaSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class PokeathlonStatResource(PokeapiCommonViewset):
|
class PokeathlonStatResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = PokeathlonStat.objects.all()
|
queryset = PokeathlonStat.objects.all()
|
||||||
serializer_class = PokeathlonStatDetailSerializer
|
serializer_class = PokeathlonStatDetailSerializer
|
||||||
list_serializer_class = PokeathlonStatSummarySerializer
|
list_serializer_class = PokeathlonStatSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class PokedexResource(PokeapiCommonViewset):
|
class PokedexResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Pokedex.objects.all()
|
queryset = Pokedex.objects.all()
|
||||||
serializer_class = PokedexDetailSerializer
|
serializer_class = PokedexDetailSerializer
|
||||||
list_serializer_class = PokedexSummarySerializer
|
list_serializer_class = PokedexSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class PokemonColorResource(PokeapiCommonViewset):
|
class PokemonColorResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = PokemonColor.objects.all()
|
queryset = PokemonColor.objects.all()
|
||||||
serializer_class = PokemonColorDetailSerializer
|
serializer_class = PokemonColorDetailSerializer
|
||||||
list_serializer_class = PokemonColorSummarySerializer
|
list_serializer_class = PokemonColorSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class PokemonFormResource(PokeapiCommonViewset):
|
class PokemonFormResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = PokemonForm.objects.all()
|
queryset = PokemonForm.objects.all()
|
||||||
serializer_class = PokemonFormDetailSerializer
|
serializer_class = PokemonFormDetailSerializer
|
||||||
list_serializer_class = PokemonFormSummarySerializer
|
list_serializer_class = PokemonFormSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class PokemonHabitatResource(PokeapiCommonViewset):
|
class PokemonHabitatResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = PokemonHabitat.objects.all()
|
queryset = PokemonHabitat.objects.all()
|
||||||
serializer_class = PokemonHabitatDetailSerializer
|
serializer_class = PokemonHabitatDetailSerializer
|
||||||
list_serializer_class = PokemonHabitatSummarySerializer
|
list_serializer_class = PokemonHabitatSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class PokemonShapeResource(PokeapiCommonViewset):
|
class PokemonShapeResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = PokemonShape.objects.all()
|
queryset = PokemonShape.objects.all()
|
||||||
serializer_class = PokemonShapeDetailSerializer
|
serializer_class = PokemonShapeDetailSerializer
|
||||||
list_serializer_class = PokemonShapeSummarySerializer
|
list_serializer_class = PokemonShapeSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class PokemonResource(PokeapiCommonViewset):
|
class PokemonResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Pokemon.objects.all()
|
queryset = Pokemon.objects.all()
|
||||||
serializer_class = PokemonDetailSerializer
|
serializer_class = PokemonDetailSerializer
|
||||||
list_serializer_class = PokemonSummarySerializer
|
list_serializer_class = PokemonSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class PokemonSpeciesResource(PokeapiCommonViewset):
|
class PokemonSpeciesResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = PokemonSpecies.objects.all().order_by("id")
|
queryset = PokemonSpecies.objects.all().order_by("id")
|
||||||
serializer_class = PokemonSpeciesDetailSerializer
|
serializer_class = PokemonSpeciesDetailSerializer
|
||||||
list_serializer_class = PokemonSpeciesSummarySerializer
|
list_serializer_class = PokemonSpeciesSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class RegionResource(PokeapiCommonViewset):
|
class RegionResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Region.objects.all()
|
queryset = Region.objects.all()
|
||||||
serializer_class = RegionDetailSerializer
|
serializer_class = RegionDetailSerializer
|
||||||
list_serializer_class = RegionSummarySerializer
|
list_serializer_class = RegionSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class StatResource(PokeapiCommonViewset):
|
class StatResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Stat.objects.all()
|
queryset = Stat.objects.all()
|
||||||
serializer_class = StatDetailSerializer
|
serializer_class = StatDetailSerializer
|
||||||
list_serializer_class = StatSummarySerializer
|
list_serializer_class = StatSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class SuperContestEffectResource(PokeapiCommonViewset):
|
class SuperContestEffectResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = SuperContestEffect.objects.all()
|
queryset = SuperContestEffect.objects.all()
|
||||||
serializer_class = SuperContestEffectDetailSerializer
|
serializer_class = SuperContestEffectDetailSerializer
|
||||||
list_serializer_class = SuperContestEffectSummarySerializer
|
list_serializer_class = SuperContestEffectSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class TypeResource(PokeapiCommonViewset):
|
class TypeResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Type.objects.all()
|
queryset = Type.objects.all()
|
||||||
serializer_class = TypeDetailSerializer
|
serializer_class = TypeDetailSerializer
|
||||||
list_serializer_class = TypeSummarySerializer
|
list_serializer_class = TypeSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class VersionResource(PokeapiCommonViewset):
|
class VersionResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = Version.objects.all()
|
queryset = Version.objects.all()
|
||||||
serializer_class = VersionDetailSerializer
|
serializer_class = VersionDetailSerializer
|
||||||
list_serializer_class = VersionSummarySerializer
|
list_serializer_class = VersionSummarySerializer
|
||||||
|
|
||||||
|
|
||||||
class VersionGroupResource(PokeapiCommonViewset):
|
class VersionGroupResource(PokeapiCommonViewset):
|
||||||
|
|
||||||
queryset = VersionGroup.objects.all()
|
queryset = VersionGroup.objects.all()
|
||||||
serializer_class = VersionGroupDetailSerializer
|
serializer_class = VersionGroupDetailSerializer
|
||||||
list_serializer_class = VersionGroupSummarySerializer
|
list_serializer_class = VersionGroupSummarySerializer
|
||||||
|
@ -412,7 +364,6 @@ class PokemonEncounterView(APIView):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def get(self, request, pokemon_id):
|
def get(self, request, pokemon_id):
|
||||||
|
|
||||||
self.context = dict(request=request)
|
self.context = dict(request=request)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -434,7 +385,6 @@ class PokemonEncounterView(APIView):
|
||||||
encounters_list = []
|
encounters_list = []
|
||||||
|
|
||||||
for area_id in area_ids:
|
for area_id in area_ids:
|
||||||
|
|
||||||
location_area = location_area_objects.get(pk=area_id)
|
location_area = location_area_objects.get(pk=area_id)
|
||||||
|
|
||||||
area_encounters = encounter_objects.filter(location_area_id=area_id)
|
area_encounters = encounter_objects.filter(location_area_id=area_id)
|
||||||
|
@ -448,7 +398,6 @@ class PokemonEncounterView(APIView):
|
||||||
version_details_list = []
|
version_details_list = []
|
||||||
|
|
||||||
for version_id in version_ids:
|
for version_id in version_ids:
|
||||||
|
|
||||||
version = version_objects.get(pk=version_id)
|
version = version_objects.get(pk=version_id)
|
||||||
|
|
||||||
version_encounters = area_encounters.filter(
|
version_encounters = area_encounters.filter(
|
||||||
|
|
|
@ -2,7 +2,6 @@ from django.db import models, migrations
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
# replaces = [(b'pokemon_v2', '0001_squashed_0006_pokemonformsprites'), (b'pokemon_v2', '0002_auto_20160301_1408')]
|
# replaces = [(b'pokemon_v2', '0001_squashed_0006_pokemonformsprites'), (b'pokemon_v2', '0002_auto_20160301_1408')]
|
||||||
|
|
||||||
# dependencies = [
|
# dependencies = [
|
||||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("pokemon_v2", "0001_squashed_0002_auto_20160301_1408"),
|
("pokemon_v2", "0001_squashed_0002_auto_20160301_1408"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -2,7 +2,6 @@ from django.db import models, migrations
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("pokemon_v2", "0002_itemsprites_pokemonformsprites_pokemonsprites"),
|
("pokemon_v2", "0002_itemsprites_pokemonformsprites_pokemonsprites"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -2,7 +2,6 @@ from django.db import models, migrations
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("pokemon_v2", "0003_auto_20160530_1132"),
|
("pokemon_v2", "0003_auto_20160530_1132"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("pokemon_v2", "0004_iso639length_20191217"),
|
("pokemon_v2", "0004_iso639length_20191217"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -2,7 +2,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("pokemon_v2", "0005_auto_20200709_1930"),
|
("pokemon_v2", "0005_auto_20200709_1930"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("pokemon_v2", "0006_auto_20200725_2205"),
|
("pokemon_v2", "0006_auto_20200725_2205"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("pokemon_v2", "0007_auto_20200815_0610"),
|
("pokemon_v2", "0007_auto_20200815_0610"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,7 +5,6 @@ import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("pokemon_v2", "0008_auto_20201123_2045"),
|
("pokemon_v2", "0008_auto_20201123_2045"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,7 +5,6 @@ import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("pokemon_v2", "0009_pokemontypepast"),
|
("pokemon_v2", "0009_pokemontypepast"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,7 +5,6 @@ import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("pokemon_v2", "0010_pokemonformtype"),
|
("pokemon_v2", "0010_pokemonformtype"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -4,7 +4,6 @@ from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("pokemon_v2", "0011_typeefficacypast"),
|
("pokemon_v2", "0011_typeefficacypast"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,7 +5,6 @@ import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
("pokemon_v2", "0012_auto_20220626_1402"),
|
("pokemon_v2", "0012_auto_20220626_1402"),
|
||||||
]
|
]
|
||||||
|
|
|
@ -6,7 +6,6 @@ from django.db import models
|
||||||
|
|
||||||
|
|
||||||
class HasAbility(models.Model):
|
class HasAbility(models.Model):
|
||||||
|
|
||||||
ability = models.ForeignKey(
|
ability = models.ForeignKey(
|
||||||
"Ability",
|
"Ability",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -20,7 +19,6 @@ class HasAbility(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasCharacteristic(models.Model):
|
class HasCharacteristic(models.Model):
|
||||||
|
|
||||||
characteristic = models.ForeignKey(
|
characteristic = models.ForeignKey(
|
||||||
"Characteristic",
|
"Characteristic",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -34,7 +32,6 @@ class HasCharacteristic(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasContestType(models.Model):
|
class HasContestType(models.Model):
|
||||||
|
|
||||||
contest_type = models.ForeignKey(
|
contest_type = models.ForeignKey(
|
||||||
"ContestType",
|
"ContestType",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -48,7 +45,6 @@ class HasContestType(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasContestEffect(models.Model):
|
class HasContestEffect(models.Model):
|
||||||
|
|
||||||
contest_effect = models.ForeignKey(
|
contest_effect = models.ForeignKey(
|
||||||
"ContestEffect",
|
"ContestEffect",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -62,7 +58,6 @@ class HasContestEffect(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasSuperContestEffect(models.Model):
|
class HasSuperContestEffect(models.Model):
|
||||||
|
|
||||||
super_contest_effect = models.ForeignKey(
|
super_contest_effect = models.ForeignKey(
|
||||||
"SuperContestEffect",
|
"SuperContestEffect",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -76,7 +71,6 @@ class HasSuperContestEffect(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasDescription(models.Model):
|
class HasDescription(models.Model):
|
||||||
|
|
||||||
description = models.CharField(max_length=1000, default="")
|
description = models.CharField(max_length=1000, default="")
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -84,7 +78,6 @@ class HasDescription(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasGender(models.Model):
|
class HasGender(models.Model):
|
||||||
|
|
||||||
gender = models.ForeignKey(
|
gender = models.ForeignKey(
|
||||||
"Gender",
|
"Gender",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -98,7 +91,6 @@ class HasGender(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasEffect(models.Model):
|
class HasEffect(models.Model):
|
||||||
|
|
||||||
effect = models.CharField(max_length=6000)
|
effect = models.CharField(max_length=6000)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -106,7 +98,6 @@ class HasEffect(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasEggGroup(models.Model):
|
class HasEggGroup(models.Model):
|
||||||
|
|
||||||
egg_group = models.ForeignKey(
|
egg_group = models.ForeignKey(
|
||||||
"EggGroup",
|
"EggGroup",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -120,7 +111,6 @@ class HasEggGroup(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasEncounterMethod(models.Model):
|
class HasEncounterMethod(models.Model):
|
||||||
|
|
||||||
encounter_method = models.ForeignKey(
|
encounter_method = models.ForeignKey(
|
||||||
"EncounterMethod",
|
"EncounterMethod",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -134,7 +124,6 @@ class HasEncounterMethod(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasEncounterCondition(models.Model):
|
class HasEncounterCondition(models.Model):
|
||||||
|
|
||||||
encounter_condition = models.ForeignKey(
|
encounter_condition = models.ForeignKey(
|
||||||
"EncounterCondition",
|
"EncounterCondition",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -148,7 +137,6 @@ class HasEncounterCondition(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasEvolutionTrigger(models.Model):
|
class HasEvolutionTrigger(models.Model):
|
||||||
|
|
||||||
evolution_trigger = models.ForeignKey(
|
evolution_trigger = models.ForeignKey(
|
||||||
"EvolutionTrigger",
|
"EvolutionTrigger",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -162,7 +150,6 @@ class HasEvolutionTrigger(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasFlavorText(models.Model):
|
class HasFlavorText(models.Model):
|
||||||
|
|
||||||
flavor_text = models.CharField(max_length=500)
|
flavor_text = models.CharField(max_length=500)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -170,7 +157,6 @@ class HasFlavorText(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasFlingEffect(models.Model):
|
class HasFlingEffect(models.Model):
|
||||||
|
|
||||||
item_fling_effect = models.ForeignKey(
|
item_fling_effect = models.ForeignKey(
|
||||||
"ItemFlingEffect",
|
"ItemFlingEffect",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -184,7 +170,6 @@ class HasFlingEffect(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasGameIndex(models.Model):
|
class HasGameIndex(models.Model):
|
||||||
|
|
||||||
game_index = models.IntegerField()
|
game_index = models.IntegerField()
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -192,7 +177,6 @@ class HasGameIndex(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasGeneration(models.Model):
|
class HasGeneration(models.Model):
|
||||||
|
|
||||||
generation = models.ForeignKey(
|
generation = models.ForeignKey(
|
||||||
"Generation",
|
"Generation",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -206,7 +190,6 @@ class HasGeneration(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasGrowthRate(models.Model):
|
class HasGrowthRate(models.Model):
|
||||||
|
|
||||||
growth_rate = models.ForeignKey(
|
growth_rate = models.ForeignKey(
|
||||||
"GrowthRate",
|
"GrowthRate",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -220,7 +203,6 @@ class HasGrowthRate(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasItem(models.Model):
|
class HasItem(models.Model):
|
||||||
|
|
||||||
item = models.ForeignKey(
|
item = models.ForeignKey(
|
||||||
"Item",
|
"Item",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -234,7 +216,6 @@ class HasItem(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasItemAttribute(models.Model):
|
class HasItemAttribute(models.Model):
|
||||||
|
|
||||||
item_attribute = models.ForeignKey(
|
item_attribute = models.ForeignKey(
|
||||||
"ItemAttribute",
|
"ItemAttribute",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -248,7 +229,6 @@ class HasItemAttribute(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasItemCategory(models.Model):
|
class HasItemCategory(models.Model):
|
||||||
|
|
||||||
item_category = models.ForeignKey(
|
item_category = models.ForeignKey(
|
||||||
"ItemCategory",
|
"ItemCategory",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -262,7 +242,6 @@ class HasItemCategory(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasItemPocket(models.Model):
|
class HasItemPocket(models.Model):
|
||||||
|
|
||||||
item_pocket = models.ForeignKey(
|
item_pocket = models.ForeignKey(
|
||||||
"ItemPocket",
|
"ItemPocket",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -276,7 +255,6 @@ class HasItemPocket(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasLanguage(models.Model):
|
class HasLanguage(models.Model):
|
||||||
|
|
||||||
language = models.ForeignKey(
|
language = models.ForeignKey(
|
||||||
"Language",
|
"Language",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -290,7 +268,6 @@ class HasLanguage(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasLocation(models.Model):
|
class HasLocation(models.Model):
|
||||||
|
|
||||||
location = models.ForeignKey(
|
location = models.ForeignKey(
|
||||||
"Location",
|
"Location",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -304,7 +281,6 @@ class HasLocation(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasLocationArea(models.Model):
|
class HasLocationArea(models.Model):
|
||||||
|
|
||||||
location_area = models.ForeignKey(
|
location_area = models.ForeignKey(
|
||||||
"LocationArea",
|
"LocationArea",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -318,7 +294,6 @@ class HasLocationArea(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasMetaAilment(models.Model):
|
class HasMetaAilment(models.Model):
|
||||||
|
|
||||||
move_meta_ailment = models.ForeignKey(
|
move_meta_ailment = models.ForeignKey(
|
||||||
"MoveMetaAilment",
|
"MoveMetaAilment",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -332,7 +307,6 @@ class HasMetaAilment(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasMetaCategory(models.Model):
|
class HasMetaCategory(models.Model):
|
||||||
|
|
||||||
move_meta_category = models.ForeignKey(
|
move_meta_category = models.ForeignKey(
|
||||||
"MoveMetaCategory",
|
"MoveMetaCategory",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -346,7 +320,6 @@ class HasMetaCategory(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasMove(models.Model):
|
class HasMove(models.Model):
|
||||||
|
|
||||||
move = models.ForeignKey(
|
move = models.ForeignKey(
|
||||||
"Move",
|
"Move",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -360,7 +333,6 @@ class HasMove(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasMoveDamageClass(models.Model):
|
class HasMoveDamageClass(models.Model):
|
||||||
|
|
||||||
move_damage_class = models.ForeignKey(
|
move_damage_class = models.ForeignKey(
|
||||||
"MoveDamageClass",
|
"MoveDamageClass",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -374,7 +346,6 @@ class HasMoveDamageClass(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasMoveEffect(models.Model):
|
class HasMoveEffect(models.Model):
|
||||||
|
|
||||||
move_effect = models.ForeignKey(
|
move_effect = models.ForeignKey(
|
||||||
"MoveEffect", blank=True, null=True, on_delete=models.CASCADE
|
"MoveEffect", blank=True, null=True, on_delete=models.CASCADE
|
||||||
)
|
)
|
||||||
|
@ -384,7 +355,6 @@ class HasMoveEffect(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasMoveAttribute(models.Model):
|
class HasMoveAttribute(models.Model):
|
||||||
|
|
||||||
move_attribute = models.ForeignKey(
|
move_attribute = models.ForeignKey(
|
||||||
"MoveAttribute", blank=True, null=True, on_delete=models.CASCADE
|
"MoveAttribute", blank=True, null=True, on_delete=models.CASCADE
|
||||||
)
|
)
|
||||||
|
@ -394,7 +364,6 @@ class HasMoveAttribute(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasMoveTarget(models.Model):
|
class HasMoveTarget(models.Model):
|
||||||
|
|
||||||
move_target = models.ForeignKey(
|
move_target = models.ForeignKey(
|
||||||
"MoveTarget",
|
"MoveTarget",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -408,7 +377,6 @@ class HasMoveTarget(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasName(models.Model):
|
class HasName(models.Model):
|
||||||
|
|
||||||
name = models.CharField(max_length=100, db_index=True)
|
name = models.CharField(max_length=100, db_index=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -416,7 +384,6 @@ class HasName(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasNature(models.Model):
|
class HasNature(models.Model):
|
||||||
|
|
||||||
nature = models.ForeignKey(
|
nature = models.ForeignKey(
|
||||||
"Nature",
|
"Nature",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -430,7 +397,6 @@ class HasNature(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasOrder(models.Model):
|
class HasOrder(models.Model):
|
||||||
|
|
||||||
order = models.IntegerField(blank=True, null=True)
|
order = models.IntegerField(blank=True, null=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -438,7 +404,6 @@ class HasOrder(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasPokeathlonStat(models.Model):
|
class HasPokeathlonStat(models.Model):
|
||||||
|
|
||||||
pokeathlon_stat = models.ForeignKey(
|
pokeathlon_stat = models.ForeignKey(
|
||||||
"PokeathlonStat",
|
"PokeathlonStat",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -452,7 +417,6 @@ class HasPokeathlonStat(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasPokedex(models.Model):
|
class HasPokedex(models.Model):
|
||||||
|
|
||||||
pokedex = models.ForeignKey(
|
pokedex = models.ForeignKey(
|
||||||
"Pokedex",
|
"Pokedex",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -466,7 +430,6 @@ class HasPokedex(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasPokemon(models.Model):
|
class HasPokemon(models.Model):
|
||||||
|
|
||||||
pokemon = models.ForeignKey(
|
pokemon = models.ForeignKey(
|
||||||
"Pokemon",
|
"Pokemon",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -480,7 +443,6 @@ class HasPokemon(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasPokemonColor(models.Model):
|
class HasPokemonColor(models.Model):
|
||||||
|
|
||||||
pokemon_color = models.ForeignKey(
|
pokemon_color = models.ForeignKey(
|
||||||
"PokemonColor",
|
"PokemonColor",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -494,7 +456,6 @@ class HasPokemonColor(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasPokemonForm(models.Model):
|
class HasPokemonForm(models.Model):
|
||||||
|
|
||||||
pokemon_form = models.ForeignKey(
|
pokemon_form = models.ForeignKey(
|
||||||
"PokemonForm",
|
"PokemonForm",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -508,7 +469,6 @@ class HasPokemonForm(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasPokemonHabitat(models.Model):
|
class HasPokemonHabitat(models.Model):
|
||||||
|
|
||||||
pokemon_habitat = models.ForeignKey(
|
pokemon_habitat = models.ForeignKey(
|
||||||
"PokemonHabitat",
|
"PokemonHabitat",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -523,7 +483,6 @@ class HasPokemonHabitat(models.Model):
|
||||||
|
|
||||||
# HasPokemonMoveMethod
|
# HasPokemonMoveMethod
|
||||||
class HasMoveLearnMethod(models.Model):
|
class HasMoveLearnMethod(models.Model):
|
||||||
|
|
||||||
move_learn_method = models.ForeignKey(
|
move_learn_method = models.ForeignKey(
|
||||||
"MoveLearnMethod",
|
"MoveLearnMethod",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -537,7 +496,6 @@ class HasMoveLearnMethod(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasPokemonShape(models.Model):
|
class HasPokemonShape(models.Model):
|
||||||
|
|
||||||
pokemon_shape = models.ForeignKey(
|
pokemon_shape = models.ForeignKey(
|
||||||
"PokemonShape",
|
"PokemonShape",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -551,7 +509,6 @@ class HasPokemonShape(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasPokemonSpecies(models.Model):
|
class HasPokemonSpecies(models.Model):
|
||||||
|
|
||||||
pokemon_species = models.ForeignKey(
|
pokemon_species = models.ForeignKey(
|
||||||
"PokemonSpecies",
|
"PokemonSpecies",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -565,7 +522,6 @@ class HasPokemonSpecies(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasRegion(models.Model):
|
class HasRegion(models.Model):
|
||||||
|
|
||||||
region = models.ForeignKey(
|
region = models.ForeignKey(
|
||||||
"Region",
|
"Region",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -579,7 +535,6 @@ class HasRegion(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasShortEffect(models.Model):
|
class HasShortEffect(models.Model):
|
||||||
|
|
||||||
short_effect = models.CharField(max_length=300)
|
short_effect = models.CharField(max_length=300)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
@ -587,7 +542,6 @@ class HasShortEffect(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasStat(models.Model):
|
class HasStat(models.Model):
|
||||||
|
|
||||||
stat = models.ForeignKey(
|
stat = models.ForeignKey(
|
||||||
"Stat",
|
"Stat",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -601,7 +555,6 @@ class HasStat(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasType(models.Model):
|
class HasType(models.Model):
|
||||||
|
|
||||||
type = models.ForeignKey(
|
type = models.ForeignKey(
|
||||||
"Type",
|
"Type",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -615,7 +568,6 @@ class HasType(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasTypeEfficacy(models.Model):
|
class HasTypeEfficacy(models.Model):
|
||||||
|
|
||||||
damage_type = models.ForeignKey(
|
damage_type = models.ForeignKey(
|
||||||
"Type",
|
"Type",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -639,7 +591,6 @@ class HasTypeEfficacy(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasVersion(models.Model):
|
class HasVersion(models.Model):
|
||||||
|
|
||||||
version = models.ForeignKey(
|
version = models.ForeignKey(
|
||||||
"Version",
|
"Version",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -653,7 +604,6 @@ class HasVersion(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class HasVersionGroup(models.Model):
|
class HasVersionGroup(models.Model):
|
||||||
|
|
||||||
version_group = models.ForeignKey(
|
version_group = models.ForeignKey(
|
||||||
"VersionGroup",
|
"VersionGroup",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -713,7 +663,6 @@ class VersionGroupMoveLearnMethod(HasVersionGroup, HasMoveLearnMethod):
|
||||||
|
|
||||||
|
|
||||||
class Language(HasName, HasOrder):
|
class Language(HasName, HasOrder):
|
||||||
|
|
||||||
iso639 = models.CharField(max_length=10)
|
iso639 = models.CharField(max_length=10)
|
||||||
|
|
||||||
iso3166 = models.CharField(max_length=2)
|
iso3166 = models.CharField(max_length=2)
|
||||||
|
@ -722,7 +671,6 @@ class Language(HasName, HasOrder):
|
||||||
|
|
||||||
|
|
||||||
class LanguageName(IsName):
|
class LanguageName(IsName):
|
||||||
|
|
||||||
local_language = models.ForeignKey(
|
local_language = models.ForeignKey(
|
||||||
"Language",
|
"Language",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -738,7 +686,6 @@ class LanguageName(IsName):
|
||||||
|
|
||||||
|
|
||||||
class Generation(HasName):
|
class Generation(HasName):
|
||||||
|
|
||||||
region = models.OneToOneField(
|
region = models.OneToOneField(
|
||||||
"Region",
|
"Region",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -771,7 +718,6 @@ class RegionName(IsName, HasRegion):
|
||||||
|
|
||||||
|
|
||||||
class Ability(HasName, HasGeneration):
|
class Ability(HasName, HasGeneration):
|
||||||
|
|
||||||
is_main_series = models.BooleanField(default=False)
|
is_main_series = models.BooleanField(default=False)
|
||||||
|
|
||||||
|
|
||||||
|
@ -792,7 +738,6 @@ class AbilityChange(HasAbility, HasVersionGroup):
|
||||||
|
|
||||||
|
|
||||||
class AbilityChangeEffectText(HasLanguage, HasEffect):
|
class AbilityChangeEffectText(HasLanguage, HasEffect):
|
||||||
|
|
||||||
ability_change = models.ForeignKey(
|
ability_change = models.ForeignKey(
|
||||||
AbilityChange,
|
AbilityChange,
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -834,7 +779,6 @@ class TypeEfficacyPast(HasTypeEfficacy, HasGeneration):
|
||||||
|
|
||||||
|
|
||||||
class Stat(HasName, HasMoveDamageClass):
|
class Stat(HasName, HasMoveDamageClass):
|
||||||
|
|
||||||
is_battle_only = models.BooleanField(default=False)
|
is_battle_only = models.BooleanField(default=False)
|
||||||
|
|
||||||
game_index = models.IntegerField()
|
game_index = models.IntegerField()
|
||||||
|
@ -850,7 +794,6 @@ class StatName(IsName, HasStat):
|
||||||
|
|
||||||
|
|
||||||
class Characteristic(HasStat):
|
class Characteristic(HasStat):
|
||||||
|
|
||||||
gene_mod_5 = models.IntegerField()
|
gene_mod_5 = models.IntegerField()
|
||||||
|
|
||||||
|
|
||||||
|
@ -901,7 +844,6 @@ class ItemFlingEffectEffectText(HasLanguage, HasEffect, HasFlingEffect):
|
||||||
|
|
||||||
|
|
||||||
class Item(HasName, HasItemCategory, HasFlingEffect):
|
class Item(HasName, HasItemCategory, HasFlingEffect):
|
||||||
|
|
||||||
cost = models.IntegerField(blank=True, null=True)
|
cost = models.IntegerField(blank=True, null=True)
|
||||||
|
|
||||||
fling_power = models.IntegerField(blank=True, null=True)
|
fling_power = models.IntegerField(blank=True, null=True)
|
||||||
|
@ -940,7 +882,6 @@ class ItemGameIndex(HasItem, HasGeneration, HasGameIndex):
|
||||||
|
|
||||||
|
|
||||||
class ItemSprites(HasItem):
|
class ItemSprites(HasItem):
|
||||||
|
|
||||||
sprites = models.CharField(max_length=1000)
|
sprites = models.CharField(max_length=1000)
|
||||||
|
|
||||||
|
|
||||||
|
@ -954,14 +895,12 @@ class ContestType(HasName):
|
||||||
|
|
||||||
|
|
||||||
class ContestTypeName(HasContestType, IsName):
|
class ContestTypeName(HasContestType, IsName):
|
||||||
|
|
||||||
flavor = models.CharField(max_length=10)
|
flavor = models.CharField(max_length=10)
|
||||||
|
|
||||||
color = models.CharField(max_length=10)
|
color = models.CharField(max_length=10)
|
||||||
|
|
||||||
|
|
||||||
class ContestEffect(models.Model):
|
class ContestEffect(models.Model):
|
||||||
|
|
||||||
appeal = models.IntegerField()
|
appeal = models.IntegerField()
|
||||||
|
|
||||||
jam = models.IntegerField()
|
jam = models.IntegerField()
|
||||||
|
@ -976,7 +915,6 @@ class ContestEffectFlavorText(HasLanguage, HasFlavorText, HasContestEffect):
|
||||||
|
|
||||||
|
|
||||||
class ContestCombo(models.Model):
|
class ContestCombo(models.Model):
|
||||||
|
|
||||||
first_move = models.ForeignKey(
|
first_move = models.ForeignKey(
|
||||||
"Move",
|
"Move",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -1004,7 +942,6 @@ class BerryFirmness(HasName):
|
||||||
|
|
||||||
|
|
||||||
class BerryFirmnessName(IsName):
|
class BerryFirmnessName(IsName):
|
||||||
|
|
||||||
berry_firmness = models.ForeignKey(
|
berry_firmness = models.ForeignKey(
|
||||||
BerryFirmness,
|
BerryFirmness,
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -1015,7 +952,6 @@ class BerryFirmnessName(IsName):
|
||||||
|
|
||||||
|
|
||||||
class Berry(HasName, HasItem):
|
class Berry(HasName, HasItem):
|
||||||
|
|
||||||
berry_firmness = models.ForeignKey(
|
berry_firmness = models.ForeignKey(
|
||||||
BerryFirmness,
|
BerryFirmness,
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -1049,7 +985,6 @@ class Berry(HasName, HasItem):
|
||||||
|
|
||||||
|
|
||||||
class BerryFlavor(HasName):
|
class BerryFlavor(HasName):
|
||||||
|
|
||||||
contest_type = models.OneToOneField(
|
contest_type = models.OneToOneField(
|
||||||
"ContestType",
|
"ContestType",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -1060,7 +995,6 @@ class BerryFlavor(HasName):
|
||||||
|
|
||||||
|
|
||||||
class BerryFlavorName(IsName):
|
class BerryFlavorName(IsName):
|
||||||
|
|
||||||
berry_flavor = models.ForeignKey(
|
berry_flavor = models.ForeignKey(
|
||||||
BerryFlavor,
|
BerryFlavor,
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -1071,7 +1005,6 @@ class BerryFlavorName(IsName):
|
||||||
|
|
||||||
|
|
||||||
class BerryFlavorMap(models.Model):
|
class BerryFlavorMap(models.Model):
|
||||||
|
|
||||||
berry = models.ForeignKey(
|
berry = models.ForeignKey(
|
||||||
Berry, blank=True, null=True, related_name="%(class)s", on_delete=models.CASCADE
|
Berry, blank=True, null=True, related_name="%(class)s", on_delete=models.CASCADE
|
||||||
)
|
)
|
||||||
|
@ -1093,7 +1026,6 @@ class BerryFlavorMap(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class GrowthRate(HasName):
|
class GrowthRate(HasName):
|
||||||
|
|
||||||
formula = models.CharField(max_length=500)
|
formula = models.CharField(max_length=500)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1107,7 +1039,6 @@ class GrowthRateDescription(HasGrowthRate, IsDescription):
|
||||||
|
|
||||||
|
|
||||||
class Nature(HasName):
|
class Nature(HasName):
|
||||||
|
|
||||||
decreased_stat = models.ForeignKey(
|
decreased_stat = models.ForeignKey(
|
||||||
Stat, blank=True, null=True, related_name="decreased", on_delete=models.CASCADE
|
Stat, blank=True, null=True, related_name="decreased", on_delete=models.CASCADE
|
||||||
)
|
)
|
||||||
|
@ -1140,12 +1071,10 @@ class NatureName(IsName, HasNature):
|
||||||
|
|
||||||
|
|
||||||
class NaturePokeathlonStat(HasNature, HasPokeathlonStat):
|
class NaturePokeathlonStat(HasNature, HasPokeathlonStat):
|
||||||
|
|
||||||
max_change = models.IntegerField()
|
max_change = models.IntegerField()
|
||||||
|
|
||||||
|
|
||||||
class NatureBattleStylePreference(HasNature):
|
class NatureBattleStylePreference(HasNature):
|
||||||
|
|
||||||
move_battle_style = models.ForeignKey(
|
move_battle_style = models.ForeignKey(
|
||||||
"MoveBattleStyle",
|
"MoveBattleStyle",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -1185,7 +1114,6 @@ class LocationAreaName(IsName, HasLocationArea):
|
||||||
|
|
||||||
|
|
||||||
class LocationAreaEncounterRate(HasEncounterMethod, HasLocationArea, HasVersion):
|
class LocationAreaEncounterRate(HasEncounterMethod, HasLocationArea, HasVersion):
|
||||||
|
|
||||||
rate = models.IntegerField()
|
rate = models.IntegerField()
|
||||||
|
|
||||||
|
|
||||||
|
@ -1203,14 +1131,12 @@ class EncounterMethodName(HasEncounterMethod, IsName):
|
||||||
|
|
||||||
|
|
||||||
class EncounterSlot(HasVersionGroup, HasEncounterMethod):
|
class EncounterSlot(HasVersionGroup, HasEncounterMethod):
|
||||||
|
|
||||||
slot = models.IntegerField(blank=True, null=True)
|
slot = models.IntegerField(blank=True, null=True)
|
||||||
|
|
||||||
rarity = models.IntegerField()
|
rarity = models.IntegerField()
|
||||||
|
|
||||||
|
|
||||||
class Encounter(HasVersion, HasLocationArea, HasPokemon):
|
class Encounter(HasVersion, HasLocationArea, HasPokemon):
|
||||||
|
|
||||||
encounter_slot = models.ForeignKey(
|
encounter_slot = models.ForeignKey(
|
||||||
EncounterSlot, blank=True, null=True, on_delete=models.CASCADE
|
EncounterSlot, blank=True, null=True, on_delete=models.CASCADE
|
||||||
)
|
)
|
||||||
|
@ -1229,12 +1155,10 @@ class EncounterConditionName(HasEncounterCondition, IsName):
|
||||||
|
|
||||||
|
|
||||||
class EncounterConditionValue(HasEncounterCondition, HasName):
|
class EncounterConditionValue(HasEncounterCondition, HasName):
|
||||||
|
|
||||||
is_default = models.BooleanField(default=False)
|
is_default = models.BooleanField(default=False)
|
||||||
|
|
||||||
|
|
||||||
class EncounterConditionValueName(IsName):
|
class EncounterConditionValueName(IsName):
|
||||||
|
|
||||||
encounter_condition_value = models.ForeignKey(
|
encounter_condition_value = models.ForeignKey(
|
||||||
EncounterConditionValue,
|
EncounterConditionValue,
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -1245,7 +1169,6 @@ class EncounterConditionValueName(IsName):
|
||||||
|
|
||||||
|
|
||||||
class EncounterConditionValueMap(models.Model):
|
class EncounterConditionValueMap(models.Model):
|
||||||
|
|
||||||
encounter = models.ForeignKey(
|
encounter = models.ForeignKey(
|
||||||
Encounter, blank=True, null=True, on_delete=models.CASCADE
|
Encounter, blank=True, null=True, on_delete=models.CASCADE
|
||||||
)
|
)
|
||||||
|
@ -1271,7 +1194,6 @@ class Move(
|
||||||
HasContestEffect,
|
HasContestEffect,
|
||||||
HasSuperContestEffect,
|
HasSuperContestEffect,
|
||||||
):
|
):
|
||||||
|
|
||||||
power = models.IntegerField(blank=True, null=True)
|
power = models.IntegerField(blank=True, null=True)
|
||||||
|
|
||||||
pp = models.IntegerField(blank=True, null=True)
|
pp = models.IntegerField(blank=True, null=True)
|
||||||
|
@ -1292,7 +1214,6 @@ class MoveFlavorText(HasMove, HasVersionGroup, IsFlavorText):
|
||||||
|
|
||||||
|
|
||||||
class MoveChange(HasMove, HasVersionGroup, HasType, HasMoveEffect):
|
class MoveChange(HasMove, HasVersionGroup, HasType, HasMoveEffect):
|
||||||
|
|
||||||
power = models.IntegerField(blank=True, null=True)
|
power = models.IntegerField(blank=True, null=True)
|
||||||
|
|
||||||
pp = models.IntegerField(blank=True, null=True)
|
pp = models.IntegerField(blank=True, null=True)
|
||||||
|
@ -1329,7 +1250,6 @@ class MoveBattleStyle(HasName):
|
||||||
|
|
||||||
|
|
||||||
class MoveBattleStyleName(IsName):
|
class MoveBattleStyleName(IsName):
|
||||||
|
|
||||||
move_battle_style = models.ForeignKey(
|
move_battle_style = models.ForeignKey(
|
||||||
MoveBattleStyle,
|
MoveBattleStyle,
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -1357,7 +1277,6 @@ class MoveEffectChange(HasMoveEffect, HasVersionGroup):
|
||||||
|
|
||||||
|
|
||||||
class MoveEffectChangeEffectText(HasLanguage, HasEffect):
|
class MoveEffectChangeEffectText(HasLanguage, HasEffect):
|
||||||
|
|
||||||
move_effect_change = models.ForeignKey(
|
move_effect_change = models.ForeignKey(
|
||||||
"MoveEffectChange",
|
"MoveEffectChange",
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -1411,7 +1330,6 @@ class MoveTargetDescription(HasMoveTarget, IsDescription):
|
||||||
|
|
||||||
|
|
||||||
class MoveMeta(HasMetaAilment, HasMetaCategory):
|
class MoveMeta(HasMetaAilment, HasMetaCategory):
|
||||||
|
|
||||||
move = models.OneToOneField(
|
move = models.OneToOneField(
|
||||||
Move,
|
Move,
|
||||||
blank=False,
|
blank=False,
|
||||||
|
@ -1458,7 +1376,6 @@ class MoveMetaCategoryDescription(HasMetaCategory, IsDescription):
|
||||||
|
|
||||||
|
|
||||||
class MoveMetaStatChange(HasMove, HasStat):
|
class MoveMetaStatChange(HasMove, HasStat):
|
||||||
|
|
||||||
change = models.IntegerField()
|
change = models.IntegerField()
|
||||||
|
|
||||||
|
|
||||||
|
@ -1468,7 +1385,6 @@ class MoveMetaStatChange(HasMove, HasStat):
|
||||||
|
|
||||||
|
|
||||||
class Experience(HasGrowthRate):
|
class Experience(HasGrowthRate):
|
||||||
|
|
||||||
level = models.IntegerField()
|
level = models.IntegerField()
|
||||||
|
|
||||||
experience = models.IntegerField()
|
experience = models.IntegerField()
|
||||||
|
@ -1489,7 +1405,6 @@ class Gender(HasName):
|
||||||
|
|
||||||
|
|
||||||
class Machine(HasGrowthRate, HasItem):
|
class Machine(HasGrowthRate, HasItem):
|
||||||
|
|
||||||
machine_number = models.IntegerField()
|
machine_number = models.IntegerField()
|
||||||
|
|
||||||
version_group = models.ForeignKey(
|
version_group = models.ForeignKey(
|
||||||
|
@ -1522,7 +1437,6 @@ class PalParkArea(HasName):
|
||||||
|
|
||||||
|
|
||||||
class PalParkAreaName(IsName):
|
class PalParkAreaName(IsName):
|
||||||
|
|
||||||
pal_park_area = models.ForeignKey(
|
pal_park_area = models.ForeignKey(
|
||||||
PalParkArea,
|
PalParkArea,
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -1533,7 +1447,6 @@ class PalParkAreaName(IsName):
|
||||||
|
|
||||||
|
|
||||||
class PalPark(HasPokemonSpecies):
|
class PalPark(HasPokemonSpecies):
|
||||||
|
|
||||||
pal_park_area = models.ForeignKey(
|
pal_park_area = models.ForeignKey(
|
||||||
PalParkArea,
|
PalParkArea,
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -1553,7 +1466,6 @@ class PalPark(HasPokemonSpecies):
|
||||||
|
|
||||||
|
|
||||||
class SuperContestEffect(models.Model):
|
class SuperContestEffect(models.Model):
|
||||||
|
|
||||||
appeal = models.IntegerField()
|
appeal = models.IntegerField()
|
||||||
|
|
||||||
|
|
||||||
|
@ -1562,7 +1474,6 @@ class SuperContestEffectFlavorText(IsFlavorText, HasSuperContestEffect):
|
||||||
|
|
||||||
|
|
||||||
class SuperContestCombo(models.Model):
|
class SuperContestCombo(models.Model):
|
||||||
|
|
||||||
first_move = models.ForeignKey(
|
first_move = models.ForeignKey(
|
||||||
Move, blank=True, null=True, related_name="first", on_delete=models.CASCADE
|
Move, blank=True, null=True, related_name="first", on_delete=models.CASCADE
|
||||||
)
|
)
|
||||||
|
@ -1578,7 +1489,6 @@ class SuperContestCombo(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class EvolutionChain(models.Model):
|
class EvolutionChain(models.Model):
|
||||||
|
|
||||||
baby_trigger_item = models.ForeignKey(
|
baby_trigger_item = models.ForeignKey(
|
||||||
Item, blank=True, null=True, on_delete=models.CASCADE
|
Item, blank=True, null=True, on_delete=models.CASCADE
|
||||||
)
|
)
|
||||||
|
@ -1598,7 +1508,6 @@ class EvolutionTriggerName(HasEvolutionTrigger, IsName):
|
||||||
|
|
||||||
|
|
||||||
class Pokedex(HasName, HasRegion):
|
class Pokedex(HasName, HasRegion):
|
||||||
|
|
||||||
is_main_series = models.BooleanField(default=False)
|
is_main_series = models.BooleanField(default=False)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1622,7 +1531,6 @@ class PokedexVersionGroup(HasPokedex, HasVersionGroup):
|
||||||
class PokemonSpecies(
|
class PokemonSpecies(
|
||||||
HasName, HasGeneration, HasPokemonColor, HasPokemonShape, HasGrowthRate, HasOrder
|
HasName, HasGeneration, HasPokemonColor, HasPokemonShape, HasGrowthRate, HasOrder
|
||||||
):
|
):
|
||||||
|
|
||||||
evolves_from_species = models.ForeignKey(
|
evolves_from_species = models.ForeignKey(
|
||||||
"self", blank=True, null=True, on_delete=models.CASCADE
|
"self", blank=True, null=True, on_delete=models.CASCADE
|
||||||
)
|
)
|
||||||
|
@ -1659,7 +1567,6 @@ class PokemonSpecies(
|
||||||
|
|
||||||
|
|
||||||
class PokemonSpeciesName(IsName, HasPokemonSpecies):
|
class PokemonSpeciesName(IsName, HasPokemonSpecies):
|
||||||
|
|
||||||
genus = models.CharField(max_length=30)
|
genus = models.CharField(max_length=30)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1672,7 +1579,6 @@ class PokemonSpeciesFlavorText(IsFlavorText, HasPokemonSpecies, HasVersion):
|
||||||
|
|
||||||
|
|
||||||
class Pokemon(HasName, HasPokemonSpecies, HasOrder):
|
class Pokemon(HasName, HasPokemonSpecies, HasOrder):
|
||||||
|
|
||||||
height = models.IntegerField(blank=True, null=True)
|
height = models.IntegerField(blank=True, null=True)
|
||||||
|
|
||||||
weight = models.IntegerField(blank=True, null=True)
|
weight = models.IntegerField(blank=True, null=True)
|
||||||
|
@ -1683,7 +1589,6 @@ class Pokemon(HasName, HasPokemonSpecies, HasOrder):
|
||||||
|
|
||||||
|
|
||||||
class PokemonAbility(HasPokemon, HasAbility):
|
class PokemonAbility(HasPokemon, HasAbility):
|
||||||
|
|
||||||
is_hidden = models.BooleanField(default=False)
|
is_hidden = models.BooleanField(default=False)
|
||||||
|
|
||||||
slot = models.IntegerField()
|
slot = models.IntegerField()
|
||||||
|
@ -1691,7 +1596,6 @@ class PokemonAbility(HasPokemon, HasAbility):
|
||||||
|
|
||||||
# model for a Pokemon's abilities that were used until a given generation
|
# model for a Pokemon's abilities that were used until a given generation
|
||||||
class PokemonAbilityPast(HasPokemon, HasAbility, HasGeneration):
|
class PokemonAbilityPast(HasPokemon, HasAbility, HasGeneration):
|
||||||
|
|
||||||
is_hidden = models.BooleanField(default=False)
|
is_hidden = models.BooleanField(default=False)
|
||||||
|
|
||||||
slot = models.IntegerField()
|
slot = models.IntegerField()
|
||||||
|
@ -1706,7 +1610,6 @@ class PokemonColorName(HasPokemonColor, IsName):
|
||||||
|
|
||||||
|
|
||||||
class PokemonDexNumber(HasPokemonSpecies, HasPokedex):
|
class PokemonDexNumber(HasPokemonSpecies, HasPokedex):
|
||||||
|
|
||||||
pokedex_number = models.IntegerField()
|
pokedex_number = models.IntegerField()
|
||||||
|
|
||||||
|
|
||||||
|
@ -1715,7 +1618,6 @@ class PokemonEggGroup(HasPokemonSpecies, HasEggGroup):
|
||||||
|
|
||||||
|
|
||||||
class PokemonEvolution(HasEvolutionTrigger, HasGender):
|
class PokemonEvolution(HasEvolutionTrigger, HasGender):
|
||||||
|
|
||||||
evolution_item = models.ForeignKey(
|
evolution_item = models.ForeignKey(
|
||||||
Item,
|
Item,
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -1790,7 +1692,6 @@ class PokemonEvolution(HasEvolutionTrigger, HasGender):
|
||||||
|
|
||||||
|
|
||||||
class PokemonForm(HasName, HasPokemon, HasOrder):
|
class PokemonForm(HasName, HasPokemon, HasOrder):
|
||||||
|
|
||||||
form_name = models.CharField(max_length=30)
|
form_name = models.CharField(max_length=30)
|
||||||
|
|
||||||
version_group = models.ForeignKey(
|
version_group = models.ForeignKey(
|
||||||
|
@ -1811,12 +1712,10 @@ class PokemonFormGeneration(HasPokemonForm, HasGeneration, HasGameIndex):
|
||||||
|
|
||||||
|
|
||||||
class PokemonFormName(HasPokemonForm, IsName):
|
class PokemonFormName(HasPokemonForm, IsName):
|
||||||
|
|
||||||
pokemon_name = models.CharField(max_length=60)
|
pokemon_name = models.CharField(max_length=60)
|
||||||
|
|
||||||
|
|
||||||
class PokemonFormSprites(HasPokemonForm):
|
class PokemonFormSprites(HasPokemonForm):
|
||||||
|
|
||||||
sprites = models.CharField(max_length=1000)
|
sprites = models.CharField(max_length=1000)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1829,7 +1728,6 @@ class PokemonHabitat(HasName):
|
||||||
|
|
||||||
|
|
||||||
class PokemonHabitatName(IsName):
|
class PokemonHabitatName(IsName):
|
||||||
|
|
||||||
pokemon_habitat = models.ForeignKey(
|
pokemon_habitat = models.ForeignKey(
|
||||||
PokemonHabitat,
|
PokemonHabitat,
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -1840,7 +1738,6 @@ class PokemonHabitatName(IsName):
|
||||||
|
|
||||||
|
|
||||||
class PokemonItem(HasPokemon, HasVersion, HasItem):
|
class PokemonItem(HasPokemon, HasVersion, HasItem):
|
||||||
|
|
||||||
rarity = models.IntegerField()
|
rarity = models.IntegerField()
|
||||||
|
|
||||||
|
|
||||||
|
@ -1859,7 +1756,6 @@ class MoveLearnMethodDescription(IsDescription, HasMoveLearnMethod):
|
||||||
|
|
||||||
|
|
||||||
class PokemonMove(HasPokemon, HasMoveLearnMethod, HasVersionGroup, HasMove, HasOrder):
|
class PokemonMove(HasPokemon, HasMoveLearnMethod, HasVersionGroup, HasMove, HasOrder):
|
||||||
|
|
||||||
level = models.IntegerField()
|
level = models.IntegerField()
|
||||||
|
|
||||||
|
|
||||||
|
@ -1868,7 +1764,6 @@ class PokemonShape(HasName):
|
||||||
|
|
||||||
|
|
||||||
class PokemonShapeName(IsName):
|
class PokemonShapeName(IsName):
|
||||||
|
|
||||||
awesome_name = models.CharField(max_length=30)
|
awesome_name = models.CharField(max_length=30)
|
||||||
|
|
||||||
pokemon_shape = models.ForeignKey(
|
pokemon_shape = models.ForeignKey(
|
||||||
|
@ -1881,28 +1776,23 @@ class PokemonShapeName(IsName):
|
||||||
|
|
||||||
|
|
||||||
class PokemonStat(HasPokemon, HasStat):
|
class PokemonStat(HasPokemon, HasStat):
|
||||||
|
|
||||||
base_stat = models.IntegerField()
|
base_stat = models.IntegerField()
|
||||||
|
|
||||||
effort = models.IntegerField()
|
effort = models.IntegerField()
|
||||||
|
|
||||||
|
|
||||||
class PokemonType(HasPokemon, HasType):
|
class PokemonType(HasPokemon, HasType):
|
||||||
|
|
||||||
slot = models.IntegerField()
|
slot = models.IntegerField()
|
||||||
|
|
||||||
|
|
||||||
class PokemonFormType(HasPokemonForm, HasType):
|
class PokemonFormType(HasPokemonForm, HasType):
|
||||||
|
|
||||||
slot = models.IntegerField()
|
slot = models.IntegerField()
|
||||||
|
|
||||||
|
|
||||||
# model for a Pokemon's types that were used until a given generation
|
# model for a Pokemon's types that were used until a given generation
|
||||||
class PokemonTypePast(HasPokemon, HasType, HasGeneration):
|
class PokemonTypePast(HasPokemon, HasType, HasGeneration):
|
||||||
|
|
||||||
slot = models.IntegerField()
|
slot = models.IntegerField()
|
||||||
|
|
||||||
|
|
||||||
class PokemonSprites(HasPokemon):
|
class PokemonSprites(HasPokemon):
|
||||||
|
|
||||||
sprites = models.CharField(max_length=20000)
|
sprites = models.CharField(max_length=20000)
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -2,4 +2,4 @@
|
||||||
pylint===2.8.2
|
pylint===2.8.2
|
||||||
pylint-django===2.4.4
|
pylint-django===2.4.4
|
||||||
astroid==2.5.6
|
astroid==2.5.6
|
||||||
black==22.3.0
|
black==23.11.0
|
||||||
|
|
Loading…
Reference in a new issue