Exemple #1
0
    def temp_get_species(self, species_json):
        new_species_json = []

        for species in species_json:
            representative_species = RepresentativeSpecies.objects.get(id=species['species_id'])
            species = get_species_data(species['species_id'])
            species['pretty_name'] = representative_species.name
            new_species_json.append(species)

        return new_species_json
Exemple #2
0
def get_species_data_ajax(request, option_id):
    species_data = get_species_data(option_id)

    return HttpResponse(content=json.dumps(species_data), content_type='application/json')