| 664 | |
| 665 | |
| 666 | class GenerationDetailSerializer(serializers.ModelSerializer): |
| 667 | main_region = RegionSummarySerializer(source="region") |
| 668 | names = GenerationNameSerializer(many=True, read_only=True, source="generationname") |
| 669 | abilities = AbilitySummarySerializer(many=True, read_only=True, source="ability") |
| 670 | moves = MoveSummarySerializer(many=True, read_only=True, source="move") |
| 671 | pokemon_species = PokemonSpeciesSummarySerializer( |
| 672 | many=True, read_only=True, source="pokemonspecies" |
| 673 | ) |
| 674 | types = TypeSummarySerializer(many=True, read_only=True, source="type") |
| 675 | version_groups = VersionGroupSummarySerializer( |
| 676 | many=True, read_only=True, source="versiongroup" |
| 677 | ) |
| 678 | |
| 679 | class Meta: |
| 680 | model = Generation |
| 681 | fields = ( |
| 682 | "id", |
| 683 | "name", |
| 684 | "abilities", |
| 685 | "main_region", |
| 686 | "moves", |
| 687 | "names", |
| 688 | "pokemon_species", |
| 689 | "types", |
| 690 | "version_groups", |
| 691 | ) |
| 692 | |
| 693 | |
| 694 | ######################## |
nothing calls this directly
no test coverage detected