mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-02 19:55:18 +02:00
Update download URL for countries JSON to use tagged version
This commit is contained in:
parent
6eff9f6456
commit
87928932c2
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ class Command(BaseCommand):
|
|||
def handle(self, *args, **options):
|
||||
countries_json_path = os.path.join(settings.MEDIA_ROOT, f'countries+regions-{COUNTRY_REGION_JSON_VERSION}.json')
|
||||
if not os.path.exists(countries_json_path):
|
||||
res = requests.get(f'https://raw.githubusercontent.com/dr5hn/countries-states-cities-database/{COUNTRY_REGION_JSON_VERSION}/countries%2Bstates.json')
|
||||
res = requests.get(f'https://raw.githubusercontent.com/dr5hn/countries-states-cities-database/refs/tags/{COUNTRY_REGION_JSON_VERSION}/json/countries%2Bstates.json')
|
||||
if res.status_code == 200:
|
||||
with open(countries_json_path, 'w') as f:
|
||||
f.write(res.text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue