feat: Add flag URL to Country type and update CountryCard component

This commit is contained in:
Sean Morley
2024-08-05 14:17:41 -04:00
parent 77c11fefea
commit d9e554ad42
14 changed files with 96 additions and 56 deletions

View File

@@ -16,7 +16,7 @@ from django.contrib.staticfiles import finders
def regions_by_country(request, country_code):
# require authentication
country = get_object_or_404(Country, country_code=country_code)
regions = Region.objects.filter(country=country)
regions = Region.objects.filter(country=country).order_by('name')
serializer = RegionSerializer(regions, many=True)
return Response(serializer.data)