summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mirrors/migrations/0015_assign_country_codes.py4
-rw-r--r--mirrors/utils.py2
-rw-r--r--mirrors/views.py2
-rw-r--r--requirements.txt2
-rw-r--r--requirements_prod.txt2
5 files changed, 6 insertions, 6 deletions
diff --git a/mirrors/migrations/0015_assign_country_codes.py b/mirrors/migrations/0015_assign_country_codes.py
index c1b0f969..5d83e02c 100644
--- a/mirrors/migrations/0015_assign_country_codes.py
+++ b/mirrors/migrations/0015_assign_country_codes.py
@@ -4,12 +4,12 @@ from south.db import db
from south.v2 import DataMigration
from django.db import models
-from django_countries.countries import OFFICIAL_COUNTRIES
+from django_countries.data import COUNTRIES
class Migration(DataMigration):
def forwards(self, orm):
- reverse_map = dict((v, k) for k, v in OFFICIAL_COUNTRIES.items())
+ reverse_map = dict((v.upper(), k) for k, v in COUNTRIES.items())
# add a few special cases to the list that we know might exist
reverse_map['GREAT BRITAIN'] = 'GB'
reverse_map['KOREA'] = 'KR'
diff --git a/mirrors/utils.py b/mirrors/utils.py
index be44121a..fe18cd6a 100644
--- a/mirrors/utils.py
+++ b/mirrors/utils.py
@@ -179,7 +179,7 @@ def get_mirror_errors(cutoff=DEFAULT_CUTOFF, mirror_id=None, show_all=False):
errors = list(errors)
for err in errors:
- err['country'] = Country(err['url__country'])
+ err['country'] = Country(err['url__country'], flag_url='')
return errors
diff --git a/mirrors/views.py b/mirrors/views.py
index 5429cea2..26b5b802 100644
--- a/mirrors/views.py
+++ b/mirrors/views.py
@@ -12,7 +12,7 @@ from django.shortcuts import get_object_or_404, redirect, render
from django.utils.timezone import now
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import condition
-from django_countries.countries import COUNTRIES
+from django_countries.data import COUNTRIES
from .models import (Mirror, MirrorUrl, MirrorProtocol, MirrorLog,
CheckLocation)
diff --git a/requirements.txt b/requirements.txt
index 4d9d636d..81070449 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -4,7 +4,7 @@ IPy==0.81
Markdown==2.4
South==0.8.4
bencode==1.0
-django-countries==1.5
+django-countries==2.0
jsmin==2.0.9
pgpdump==1.5
pytz>=2013.8
diff --git a/requirements_prod.txt b/requirements_prod.txt
index 5feb890d..840e0396 100644
--- a/requirements_prod.txt
+++ b/requirements_prod.txt
@@ -4,7 +4,7 @@ IPy==0.81
Markdown==2.4
South==0.8.4
bencode==1.0
-django-countries==1.5
+django-countries==2.0
jsmin==2.0.9
pgpdump==1.5
psycopg2==2.5.2