mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-02 11:45:17 +02:00
feat: Add flag URL to Country type and update CountryCard component
This commit is contained in:
parent
77c11fefea
commit
d9e554ad42
14 changed files with 96 additions and 56 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue