Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replaced 2-letter country codes with the official UEFA 3-letter codes.

  • Loading branch information...
commit 8d9ec5710f53e0b86fdd60c9a4dc7a8cbd973933 1 parent fd382d2
Thomas Buchberger buchi authored
Showing with 19 additions and 18 deletions.
  1. +18 −16 ftw/footballchallenge/config.py
  2. +1 −2  ftw/footballchallenge/nation.py
34 ftw/footballchallenge/config.py
View
@@ -71,23 +71,25 @@
u'Mittelfeld - Linkes Mittelfeld': 'midfield',
u'Mittelfeld - Rechtes Mittelfeld': 'midfield'}
+# Official UEFA country codes
+# These are *not* the same as ISO-3155-1-alpha3
COUNTRY_CODE_MAPPING = {
- u'Deutschland': 'de',
- u'Dänemark': 'dk',
- u'England': 'uk',
- u'Frankreich': 'fr',
- u'Griechenland': 'gr',
- u'Irland': 'ir',
- u'Italien': 'it',
- u'Kroatien': 'hr',
- u'Niederlande': 'nl',
- u'Polen': 'pl',
- u'Portugal': 'pt',
- u'Russland': 'ru',
- u'Schweden': 'se',
- u'Spanien': 'es',
- u'Tschechien': 'cz',
- u'Ukraine': 'ua',
+ u'Deutschland': 'GER',
+ u'Dänemark': 'DEN',
+ u'England': 'ENG',
+ u'Frankreich': 'FRA',
+ u'Griechenland': 'GRE',
+ u'Irland': 'IRL',
+ u'Italien': 'ITA',
+ u'Kroatien': 'CRO',
+ u'Niederlande': 'NED',
+ u'Polen': 'POL',
+ u'Portugal': 'POR',
+ u'Russland': 'RUS',
+ u'Schweden': 'SWE',
+ u'Spanien': 'ESP',
+ u'Tschechien': 'CZE',
+ u'Ukraine': 'UKR',
}
3  ftw/footballchallenge/nation.py
View
@@ -16,8 +16,7 @@ class Nation(Base):
implements(INation)
id_ = Column('id', Integer, primary_key=True)
name = Column(String(45))
- # 2-letter country code http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
- country = Column(String(2))
+ country = Column(String(3))
coach = Column(String(64))
participations = Column(Integer)
fifa_rank = Column(Integer)
Please sign in to comment.
Something went wrong with that request. Please try again.