changeset 609:678a1a2ef55a

For issue 16, add country flag icons to user profiles & forum posts.
author Brian Neal <bgneal@gmail.com>
date Sat, 28 Jul 2012 15:12:09 -0500
parents 8ddd6490cbc9
children 838eb32383a9
files bio/flag_data.json bio/flags.py bio/forms.py bio/models.py bio/static/css/bio.css bio/templatetags/bio_tags.py core/widgets.py sg101/templates/bio/flag_icon.html sg101/templates/bio/view_profile.html sg101/templates/forums/display_post.html static/flags/24/_abkhazia.png static/flags/24/_commonwealth.png static/flags/24/_england.png static/flags/24/_european-union.png static/flags/24/_kosovo.png static/flags/24/_mars.png static/flags/24/_nagorno-karabakh.png static/flags/24/_nato.png static/flags/24/_northern-cyprus.png static/flags/24/_olympics.png static/flags/24/_red-cross.png static/flags/24/_scotland.png static/flags/24/_somaliland.png static/flags/24/_south-ossetia.png static/flags/24/_united-nations.png static/flags/24/_vatican.png static/flags/24/_wales.png static/flags/24/_world.png static/flags/24/ad.png static/flags/24/ae.png static/flags/24/af.png static/flags/24/ag.png static/flags/24/ai.png static/flags/24/al.png static/flags/24/am.png static/flags/24/an.png static/flags/24/ao.png static/flags/24/aq.png static/flags/24/ar.png static/flags/24/as.png static/flags/24/at.png static/flags/24/au.png static/flags/24/aw.png static/flags/24/ax.png static/flags/24/az.png static/flags/24/ba.png static/flags/24/bb.png static/flags/24/bd.png static/flags/24/be.png static/flags/24/bf.png static/flags/24/bg.png static/flags/24/bh.png static/flags/24/bi.png static/flags/24/bj.png static/flags/24/bl.png static/flags/24/bm.png static/flags/24/bn.png static/flags/24/bo.png static/flags/24/br.png static/flags/24/bs.png static/flags/24/bt.png static/flags/24/bw.png static/flags/24/by.png static/flags/24/bz.png static/flags/24/ca.png static/flags/24/cd.png static/flags/24/cf.png static/flags/24/cg.png static/flags/24/ch.png static/flags/24/ci.png static/flags/24/cl.png static/flags/24/cm.png static/flags/24/cn.png static/flags/24/co.png static/flags/24/cr.png static/flags/24/cu.png static/flags/24/cv.png static/flags/24/cy.png static/flags/24/cz.png static/flags/24/de.png static/flags/24/dj.png static/flags/24/dk.png static/flags/24/dm.png static/flags/24/do.png static/flags/24/dz.png static/flags/24/ec.png static/flags/24/ee.png static/flags/24/eg.png static/flags/24/eh.png static/flags/24/er.png static/flags/24/es.png static/flags/24/et.png static/flags/24/fi.png static/flags/24/fj.png static/flags/24/fk.png static/flags/24/fm.png static/flags/24/fo.png static/flags/24/fr.png static/flags/24/ga.png static/flags/24/gb.png static/flags/24/gd.png static/flags/24/ge.png static/flags/24/gg.png static/flags/24/gh.png static/flags/24/gl.png static/flags/24/gm.png static/flags/24/gn.png static/flags/24/gq.png static/flags/24/gr.png static/flags/24/gs.png static/flags/24/gt.png static/flags/24/gu.png static/flags/24/gw.png static/flags/24/gy.png static/flags/24/hk.png static/flags/24/hn.png static/flags/24/hr.png static/flags/24/ht.png static/flags/24/hu.png static/flags/24/id.png static/flags/24/ie.png static/flags/24/il.png static/flags/24/im.png static/flags/24/in.png static/flags/24/iq.png static/flags/24/ir.png static/flags/24/is.png static/flags/24/it.png static/flags/24/je.png static/flags/24/jm.png static/flags/24/jo.png static/flags/24/jp.png static/flags/24/ke.png static/flags/24/kg.png static/flags/24/kh.png static/flags/24/ki.png static/flags/24/km.png static/flags/24/kn.png static/flags/24/kp.png static/flags/24/kr.png static/flags/24/kw.png static/flags/24/ky.png static/flags/24/kz.png static/flags/24/la.png static/flags/24/lb.png static/flags/24/lc.png static/flags/24/li.png static/flags/24/lk.png static/flags/24/lr.png static/flags/24/ls.png static/flags/24/lt.png static/flags/24/lu.png static/flags/24/lv.png static/flags/24/ly.png static/flags/24/ma.png static/flags/24/mc.png static/flags/24/md.png static/flags/24/me.png static/flags/24/mg.png static/flags/24/mh.png static/flags/24/mk.png static/flags/24/ml.png static/flags/24/mm.png static/flags/24/mn.png static/flags/24/mo.png static/flags/24/mp.png static/flags/24/mr.png static/flags/24/ms.png static/flags/24/mt.png static/flags/24/mu.png static/flags/24/mv.png static/flags/24/mw.png static/flags/24/mx.png static/flags/24/my.png static/flags/24/mz.png static/flags/24/na.png static/flags/24/ne.png static/flags/24/nf.png static/flags/24/ng.png static/flags/24/ni.png static/flags/24/nl.png static/flags/24/no.png static/flags/24/np.png static/flags/24/nr.png static/flags/24/nz.png static/flags/24/om.png static/flags/24/pa.png static/flags/24/pe.png static/flags/24/pg.png static/flags/24/ph.png static/flags/24/pk.png static/flags/24/pl.png static/flags/24/pn.png static/flags/24/pr.png static/flags/24/ps.png static/flags/24/pt.png static/flags/24/pw.png static/flags/24/py.png static/flags/24/qa.png static/flags/24/ro.png static/flags/24/rs.png static/flags/24/ru.png static/flags/24/rw.png static/flags/24/sa.png static/flags/24/sb.png static/flags/24/sc.png static/flags/24/sd.png static/flags/24/se.png static/flags/24/sg.png static/flags/24/sh.png static/flags/24/si.png static/flags/24/sk.png static/flags/24/sl.png static/flags/24/sm.png static/flags/24/sn.png static/flags/24/so.png static/flags/24/sr.png static/flags/24/st.png static/flags/24/sv.png static/flags/24/sy.png static/flags/24/sz.png static/flags/24/tc.png static/flags/24/td.png static/flags/24/tg.png static/flags/24/th.png static/flags/24/tj.png static/flags/24/tl.png static/flags/24/tm.png static/flags/24/tn.png static/flags/24/to.png static/flags/24/tr.png static/flags/24/tt.png static/flags/24/tv.png static/flags/24/tw.png static/flags/24/tz.png static/flags/24/ua.png static/flags/24/ug.png static/flags/24/us.png static/flags/24/uy.png static/flags/24/uz.png static/flags/24/vc.png static/flags/24/ve.png static/flags/24/vg.png static/flags/24/vi.png static/flags/24/vn.png static/flags/24/vu.png static/flags/24/ws.png static/flags/24/ye.png static/flags/24/za.png static/flags/24/zm.png static/flags/24/zw.png static/flags/64/_abkhazia.png static/flags/64/_commonwealth.png static/flags/64/_england.png static/flags/64/_european-union.png static/flags/64/_kosovo.png static/flags/64/_mars.png static/flags/64/_nagorno-karabakh.png static/flags/64/_nato.png static/flags/64/_northern-cyprus.png static/flags/64/_olympics.png static/flags/64/_red-cross.png static/flags/64/_scotland.png static/flags/64/_somaliland.png static/flags/64/_south-ossetia.png static/flags/64/_united-nations.png static/flags/64/_vatican.png static/flags/64/_wales.png static/flags/64/_world.png static/flags/64/ad.png static/flags/64/ae.png static/flags/64/af.png static/flags/64/ag.png static/flags/64/ai.png static/flags/64/al.png static/flags/64/am.png static/flags/64/an.png static/flags/64/ao.png static/flags/64/aq.png static/flags/64/ar.png static/flags/64/as.png static/flags/64/at.png static/flags/64/au.png static/flags/64/aw.png static/flags/64/ax.png static/flags/64/az.png static/flags/64/ba.png static/flags/64/bb.png static/flags/64/bd.png static/flags/64/be.png static/flags/64/bf.png static/flags/64/bg.png static/flags/64/bh.png static/flags/64/bi.png static/flags/64/bj.png static/flags/64/bl.png static/flags/64/bm.png static/flags/64/bn.png static/flags/64/bo.png static/flags/64/br.png static/flags/64/bs.png static/flags/64/bt.png static/flags/64/bw.png static/flags/64/by.png static/flags/64/bz.png static/flags/64/ca.png static/flags/64/cd.png static/flags/64/cf.png static/flags/64/cg.png static/flags/64/ch.png static/flags/64/ci.png static/flags/64/cl.png static/flags/64/cm.png static/flags/64/cn.png static/flags/64/co.png static/flags/64/cr.png static/flags/64/cu.png static/flags/64/cv.png static/flags/64/cy.png static/flags/64/cz.png static/flags/64/de.png static/flags/64/dj.png static/flags/64/dk.png static/flags/64/dm.png static/flags/64/do.png static/flags/64/dz.png static/flags/64/ec.png static/flags/64/ee.png static/flags/64/eg.png static/flags/64/eh.png static/flags/64/er.png static/flags/64/es.png static/flags/64/et.png static/flags/64/fi.png static/flags/64/fj.png static/flags/64/fk.png static/flags/64/fm.png static/flags/64/fo.png static/flags/64/fr.png static/flags/64/ga.png static/flags/64/gb.png static/flags/64/gd.png static/flags/64/ge.png static/flags/64/gg.png static/flags/64/gh.png static/flags/64/gl.png static/flags/64/gm.png static/flags/64/gn.png static/flags/64/gq.png static/flags/64/gr.png static/flags/64/gs.png static/flags/64/gt.png static/flags/64/gu.png static/flags/64/gw.png static/flags/64/gy.png static/flags/64/hk.png static/flags/64/hn.png static/flags/64/hr.png static/flags/64/ht.png static/flags/64/hu.png static/flags/64/id.png static/flags/64/ie.png static/flags/64/il.png static/flags/64/im.png static/flags/64/in.png static/flags/64/iq.png static/flags/64/ir.png static/flags/64/is.png static/flags/64/it.png static/flags/64/je.png static/flags/64/jm.png static/flags/64/jo.png static/flags/64/jp.png static/flags/64/ke.png static/flags/64/kg.png static/flags/64/kh.png static/flags/64/ki.png static/flags/64/km.png static/flags/64/kn.png static/flags/64/kp.png static/flags/64/kr.png static/flags/64/kw.png static/flags/64/ky.png static/flags/64/kz.png static/flags/64/la.png static/flags/64/lb.png static/flags/64/lc.png static/flags/64/li.png static/flags/64/lk.png static/flags/64/lr.png static/flags/64/ls.png static/flags/64/lt.png static/flags/64/lu.png static/flags/64/lv.png static/flags/64/ly.png static/flags/64/ma.png static/flags/64/mc.png static/flags/64/md.png static/flags/64/me.png static/flags/64/mg.png static/flags/64/mh.png static/flags/64/mk.png static/flags/64/ml.png static/flags/64/mm.png static/flags/64/mn.png static/flags/64/mo.png static/flags/64/mp.png static/flags/64/mr.png static/flags/64/ms.png static/flags/64/mt.png static/flags/64/mu.png static/flags/64/mv.png static/flags/64/mw.png static/flags/64/mx.png static/flags/64/my.png static/flags/64/mz.png static/flags/64/na.png static/flags/64/ne.png static/flags/64/nf.png static/flags/64/ng.png static/flags/64/ni.png static/flags/64/nl.png static/flags/64/no.png static/flags/64/np.png static/flags/64/nr.png static/flags/64/nz.png static/flags/64/om.png static/flags/64/pa.png static/flags/64/pe.png static/flags/64/pg.png static/flags/64/ph.png static/flags/64/pk.png static/flags/64/pl.png static/flags/64/pn.png static/flags/64/pr.png static/flags/64/ps.png static/flags/64/pt.png static/flags/64/pw.png static/flags/64/py.png static/flags/64/qa.png static/flags/64/ro.png static/flags/64/rs.png static/flags/64/ru.png static/flags/64/rw.png static/flags/64/sa.png static/flags/64/sb.png static/flags/64/sc.png static/flags/64/sd.png static/flags/64/se.png static/flags/64/sg.png static/flags/64/sh.png static/flags/64/si.png static/flags/64/sk.png static/flags/64/sl.png static/flags/64/sm.png static/flags/64/sn.png static/flags/64/so.png static/flags/64/sr.png static/flags/64/st.png static/flags/64/sv.png static/flags/64/sy.png static/flags/64/sz.png static/flags/64/tc.png static/flags/64/td.png static/flags/64/tg.png static/flags/64/th.png static/flags/64/tj.png static/flags/64/tl.png static/flags/64/tm.png static/flags/64/tn.png static/flags/64/to.png static/flags/64/tr.png static/flags/64/tt.png static/flags/64/tv.png static/flags/64/tw.png static/flags/64/tz.png static/flags/64/ua.png static/flags/64/ug.png static/flags/64/us.png static/flags/64/uy.png static/flags/64/uz.png static/flags/64/vc.png static/flags/64/ve.png static/flags/64/vg.png static/flags/64/vi.png static/flags/64/vn.png static/flags/64/vu.png static/flags/64/ws.png static/flags/64/ye.png static/flags/64/za.png static/flags/64/zm.png static/flags/64/zw.png tools/flag_data.py
diffstat 493 files changed, 312 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bio/flag_data.json	Sat Jul 28 15:12:09 2012 -0500
@@ -0,0 +1,224 @@
+{
+    "ad": "Andorra", 
+    "ae": "United Arab Emirates", 
+    "af": "Afghanistan", 
+    "ag": "Antigua and Barbuda", 
+    "ai": "Anguilla", 
+    "al": "Albania", 
+    "am": "Armenia", 
+    "ao": "Angola", 
+    "aq": "Antarctica", 
+    "ar": "Argentina", 
+    "as": "American Samoa", 
+    "at": "Austria", 
+    "au": "Australia", 
+    "aw": "Aruba", 
+    "ax": "Ã…land Islands", 
+    "az": "Azerbaijan", 
+    "ba": "Bosnia and Herzegovina", 
+    "bb": "Barbados", 
+    "bd": "Bangladesh", 
+    "be": "Belgium", 
+    "bf": "Burkina Faso", 
+    "bg": "Bulgaria", 
+    "bh": "Bahrain", 
+    "bi": "Burundi", 
+    "bj": "Benin", 
+    "bl": "Saint Barthélemy", 
+    "bm": "Bermuda", 
+    "bn": "Brunei Darussalam", 
+    "bo": "Bolivia", 
+    "br": "Brazil", 
+    "bs": "Bahamas", 
+    "bt": "Bhutan", 
+    "bw": "Botswana", 
+    "by": "Belarus", 
+    "bz": "Belize", 
+    "ca": "Canada", 
+    "cd": "Congo, The Democratic Republic of the", 
+    "cf": "Central African Republic", 
+    "cg": "Congo", 
+    "ch": "Switzerland", 
+    "ci": "Côte d'Ivoire", 
+    "cl": "Chile", 
+    "cm": "Cameroon", 
+    "cn": "China", 
+    "co": "Colombia", 
+    "cr": "Costa Rica", 
+    "cu": "Cuba", 
+    "cv": "Cape Verde", 
+    "cy": "Cyprus", 
+    "cz": "Czech Republic", 
+    "de": "Germany", 
+    "dj": "Djibouti", 
+    "dk": "Denmark", 
+    "dm": "Dominica", 
+    "do": "Dominican Republic", 
+    "dz": "Algeria", 
+    "ec": "Ecuador", 
+    "ee": "Estonia", 
+    "eg": "Egypt", 
+    "eh": "Western Sahara", 
+    "er": "Eritrea", 
+    "es": "Spain", 
+    "et": "Ethiopia", 
+    "fi": "Finland", 
+    "fj": "Fiji", 
+    "fk": "Falkland Islands (Malvinas)", 
+    "fm": "Micronesia, Federated States of", 
+    "fo": "Faroe Islands", 
+    "fr": "France", 
+    "ga": "Gabon", 
+    "gb": "United Kingdom", 
+    "gd": "Grenada", 
+    "ge": "Georgia", 
+    "gg": "Guernsey", 
+    "gh": "Ghana", 
+    "gl": "Greenland", 
+    "gm": "Gambia", 
+    "gn": "Guinea", 
+    "gq": "Equatorial Guinea", 
+    "gr": "Greece", 
+    "gs": "South Georgia and the South Sandwich Islands", 
+    "gt": "Guatemala", 
+    "gu": "Guam", 
+    "gw": "Guinea-Bissau", 
+    "gy": "Guyana", 
+    "hk": "Hong Kong", 
+    "hn": "Honduras", 
+    "hr": "Croatia", 
+    "ht": "Haiti", 
+    "hu": "Hungary", 
+    "id": "Indonesia", 
+    "ie": "Ireland", 
+    "il": "Israel", 
+    "im": "Isle of Man", 
+    "in": "India", 
+    "iq": "Iraq", 
+    "ir": "Iran, Islamic Republic of", 
+    "is": "Iceland", 
+    "it": "Italy", 
+    "je": "Jersey", 
+    "jm": "Jamaica", 
+    "jo": "Jordan", 
+    "jp": "Japan", 
+    "ke": "Kenya", 
+    "kg": "Kyrgyzstan", 
+    "kh": "Cambodia", 
+    "ki": "Kiribati", 
+    "km": "Comoros", 
+    "kn": "Saint Kitts and Nevis", 
+    "kp": "Korea, Democratic People's Republic of", 
+    "kr": "Korea, Republic of", 
+    "kw": "Kuwait", 
+    "ky": "Cayman Islands", 
+    "kz": "Kazakhstan", 
+    "la": "Lao People's Democratic Republic", 
+    "lb": "Lebanon", 
+    "lc": "Saint Lucia", 
+    "li": "Liechtenstein", 
+    "lk": "Sri Lanka", 
+    "lr": "Liberia", 
+    "ls": "Lesotho", 
+    "lt": "Lithuania", 
+    "lu": "Luxembourg", 
+    "lv": "Latvia", 
+    "ly": "Libya", 
+    "ma": "Morocco", 
+    "mc": "Monaco", 
+    "md": "Moldova", 
+    "me": "Montenegro", 
+    "mg": "Madagascar", 
+    "mh": "Marshall Islands", 
+    "mk": "Macedonia, Republic of", 
+    "ml": "Mali", 
+    "mm": "Myanmar", 
+    "mn": "Mongolia", 
+    "mo": "Macao", 
+    "mp": "Northern Mariana Islands", 
+    "mr": "Mauritania", 
+    "ms": "Montserrat", 
+    "mt": "Malta", 
+    "mu": "Mauritius", 
+    "mv": "Maldives", 
+    "mw": "Malawi", 
+    "mx": "Mexico", 
+    "my": "Malaysia", 
+    "mz": "Mozambique", 
+    "na": "Namibia", 
+    "ne": "Niger", 
+    "nf": "Norfolk Island", 
+    "ng": "Nigeria", 
+    "ni": "Nicaragua", 
+    "nl": "Netherlands", 
+    "no": "Norway", 
+    "np": "Nepal", 
+    "nr": "Nauru", 
+    "nz": "New Zealand", 
+    "om": "Oman", 
+    "pa": "Panama", 
+    "pe": "Peru", 
+    "pg": "Papua New Guinea", 
+    "ph": "Philippines", 
+    "pk": "Pakistan", 
+    "pl": "Poland", 
+    "pn": "Pitcairn", 
+    "pr": "Puerto Rico", 
+    "ps": "Palestinian Territory, Occupied", 
+    "pt": "Portugal", 
+    "pw": "Palau", 
+    "py": "Paraguay", 
+    "qa": "Qatar", 
+    "ro": "Romania", 
+    "rs": "Serbia", 
+    "ru": "Russian Federation", 
+    "rw": "Rwanda", 
+    "sa": "Saudi Arabia", 
+    "sb": "Solomon Islands", 
+    "sc": "Seychelles", 
+    "sd": "Sudan", 
+    "se": "Sweden", 
+    "sg": "Singapore", 
+    "sh": "Saint Helena, Ascension and Tristan da Cunha", 
+    "si": "Slovenia", 
+    "sk": "Slovakia", 
+    "sl": "Sierra Leone", 
+    "sm": "San Marino", 
+    "sn": "Senegal", 
+    "so": "Somalia", 
+    "sr": "Suriname", 
+    "st": "Sao Tome and Principe", 
+    "sv": "El Salvador", 
+    "sy": "Syrian Arab Republic", 
+    "sz": "Swaziland", 
+    "tc": "Turks and Caicos Islands", 
+    "td": "Chad", 
+    "tg": "Togo", 
+    "th": "Thailand", 
+    "tj": "Tajikistan", 
+    "tl": "Timor-Leste", 
+    "tm": "Turkmenistan", 
+    "tn": "Tunisia", 
+    "to": "Tonga", 
+    "tr": "Turkey", 
+    "tt": "Trinidad and Tobago", 
+    "tv": "Tuvalu", 
+    "tw": "Taiwan", 
+    "tz": "Tanzania, United Republic of", 
+    "ua": "Ukraine", 
+    "ug": "Uganda", 
+    "us": "United States", 
+    "uy": "Uruguay", 
+    "uz": "Uzbekistan", 
+    "vc": "Saint Vincent and the Grenadines", 
+    "ve": "Venezuela", 
+    "vg": "Virgin Islands, British", 
+    "vi": "Virgin Islands, U.S.", 
+    "vn": "Viet Nam", 
+    "vu": "Vanuatu", 
+    "ws": "Samoa", 
+    "ye": "Yemen", 
+    "za": "South Africa", 
+    "zm": "Zambia", 
+    "zw": "Zimbabwe"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bio/flags.py	Sat Jul 28 15:12:09 2012 -0500
@@ -0,0 +1,32 @@
+"""
+This module contains country flag data & functions.
+
+"""
+from __future__ import with_statement
+import os.path
+import locale
+import logging
+
+import django.utils.simplejson as json
+
+
+# Read flag data from external JSON file:
+
+FLAG_DATA = {}
+
+datafile = os.path.join(os.path.split(__file__)[0], 'flag_data.json')
+
+try:
+    with open(datafile, 'r') as fp:
+        FLAG_DATA = json.load(fp, encoding='utf-8')
+except IOError:
+    FLAG_DATA = {}
+    logging.error("Could not load flag_data.json")
+
+# Build a choices list for use with Django models, etc.
+# The locale is set in order to sort the place names correctly:
+
+locale.setlocale(locale.LC_ALL, '')
+
+FLAG_CHOICES = sorted(FLAG_DATA.items(),
+        cmp=lambda lhs, rhs: locale.strcoll(lhs[1], rhs[1]))
--- a/bio/forms.py	Thu Jul 26 14:18:10 2012 -0500
+++ b/bio/forms.py	Sat Jul 28 15:12:09 2012 -0500
@@ -26,9 +26,9 @@
 
 class EditUserProfileForm(forms.ModelForm):
     """Form for editing the fields of the UserProfile model."""
-    location = forms.CharField(required=False, widget=forms.TextInput(attrs={'size' : 64 }))
-    occupation = forms.CharField(required=False, widget=forms.TextInput(attrs={'size' : 64 }))
-    interests = forms.CharField(required=False, widget=forms.TextInput(attrs={'size' : 64 }))
+    location = forms.CharField(required=False, widget=forms.TextInput(attrs={'size': 64 }))
+    occupation = forms.CharField(required=False, widget=forms.TextInput(attrs={'size': 64 }))
+    interests = forms.CharField(required=False, widget=forms.TextInput(attrs={'size': 64 }))
     time_zone = forms.CharField(required=False, widget=forms.HiddenInput())
     use_24_time = forms.BooleanField(label='Show times in 24-hour mode', required=False)
     profile_text = forms.CharField(required=False,
@@ -42,7 +42,7 @@
 
     class Meta:
         model = UserProfile
-        fields = ('location', 'birthday', 'occupation', 'interests',
+        fields = ('location', 'country', 'birthday', 'occupation', 'interests',
             'profile_text', 'hide_email', 'signature', 'time_zone',
             'use_24_time', 'auto_favorite', 'auto_subscribe')
 
--- a/bio/models.py	Thu Jul 26 14:18:10 2012 -0500
+++ b/bio/models.py	Sat Jul 28 15:12:09 2012 -0500
@@ -12,6 +12,7 @@
 from django.template.loader import render_to_string
 
 from core.markup import SiteMarkup
+import bio.flags
 
 
 # These are the secondary user status enumeration values. 
@@ -75,6 +76,9 @@
 
     user = models.ForeignKey(User, unique=True)
     location = models.CharField(max_length=128, blank=True)
+    country = models.CharField(max_length=2, blank=True, default='',
+            choices=bio.flags.FLAG_CHOICES,
+            help_text='Optional')
     birthday = models.DateField(blank=True, null=True,
             help_text='Optional; the year is not shown to others')
     occupation = models.CharField(max_length=128, blank=True)
--- a/bio/static/css/bio.css	Thu Jul 26 14:18:10 2012 -0500
+++ b/bio/static/css/bio.css	Sat Jul 28 15:12:09 2012 -0500
@@ -36,3 +36,13 @@
 div.members-list tr.odd {
    background-color: #ddd;
 }
+
+div.flag { 
+   float:left;
+   text-size: small;
+   font-weight: bold;
+}
+div.flag img { 
+   vertical-align: middle;
+   margin-bottom: 3px;
+}
--- a/bio/templatetags/bio_tags.py	Thu Jul 26 14:18:10 2012 -0500
+++ b/bio/templatetags/bio_tags.py	Sat Jul 28 15:12:09 2012 -0500
@@ -5,6 +5,7 @@
 from django.conf import settings
 from django.core.cache import cache
 
+import bio.flags
 import bio.models
 from bio.models import UserProfile
 
@@ -95,3 +96,22 @@
     else:
         return u'(%s)' % profile.get_status_display()
 
+
+@register.inclusion_tag('bio/flag_icon.html')
+def flag_icon(code, size='small'):
+    """Renders a flag icon for the requested ISO-3166-1 alpha 2
+    code.
+
+    """
+    try:
+        name = bio.flags.FLAG_DATA[code]
+    except KeyError:
+        code = 'zz'
+        name = ''
+
+    return {
+        'code': code,
+        'name': name,
+        'size': size,
+        'STATIC_URL': settings.STATIC_URL,
+    }
--- a/core/widgets.py	Thu Jul 26 14:18:10 2012 -0500
+++ b/core/widgets.py	Sat Jul 28 15:12:09 2012 -0500
@@ -5,7 +5,6 @@
 from django import forms
 from django.utils.safestring import mark_safe
 from django.core.urlresolvers import reverse
-from django.conf import settings
 
 
 class AutoCompleteUserInput(forms.TextInput):
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sg101/templates/bio/flag_icon.html	Sat Jul 28 15:12:09 2012 -0500
@@ -0,0 +1,10 @@
+{% if code != 'zz' %}
+   {% if size == 'large' %}
+      <div class="flag">
+      <img src="{{ STATIC_URL }}flags/64/{{ code }}.png" alt="{{ name }}" title="{{ name }}" />
+      {{ name }}
+      </div>
+   {% else %}
+      <img src="{{ STATIC_URL }}flags/24/{{ code }}.png" alt="{{ name }}" title="{{ name }}" />
+   {% endif %}
+{% endif %}
--- a/sg101/templates/bio/view_profile.html	Thu Jul 26 14:18:10 2012 -0500
+++ b/sg101/templates/bio/view_profile.html	Sat Jul 28 15:12:09 2012 -0500
@@ -43,6 +43,9 @@
    {% if profile.location %}
    <tr><th>Location</th><td>{{ profile.location }}</td></tr>
    {% endif %}
+   {% if profile.country %}
+   <tr><th>Country</th><td>{% flag_icon profile.country 'large' %}</td></tr>
+   {% endif %}
    {% if profile.occupation %}
    <tr><th>Occupation</th><td>{{ profile.occupation }}</td></tr>
    {% endif %}
--- a/sg101/templates/forums/display_post.html	Thu Jul 26 14:18:10 2012 -0500
+++ b/sg101/templates/forums/display_post.html	Sat Jul 28 15:12:09 2012 -0500
@@ -11,6 +11,9 @@
       {% if post.user.user_profile.location %}
          {{ post.user.user_profile.location }}<br />
       {% endif %}
+      {% if post.user.user_profile.country %}
+         {% flag_icon post.user.user_profile.country 'small' %}<br />
+      {% endif %}
       {% for bo in post.user.user_profile.badge_ownership %}
          <img src="{{ bo.badge.image.url }}" alt="{{ bo.badge_count_str }}" title="{{ bo.badge_count_str }}" />
       {% endfor %}
Binary file static/flags/24/_abkhazia.png has changed
Binary file static/flags/24/_commonwealth.png has changed
Binary file static/flags/24/_england.png has changed
Binary file static/flags/24/_european-union.png has changed
Binary file static/flags/24/_kosovo.png has changed
Binary file static/flags/24/_mars.png has changed
Binary file static/flags/24/_nagorno-karabakh.png has changed
Binary file static/flags/24/_nato.png has changed
Binary file static/flags/24/_northern-cyprus.png has changed
Binary file static/flags/24/_olympics.png has changed
Binary file static/flags/24/_red-cross.png has changed
Binary file static/flags/24/_scotland.png has changed
Binary file static/flags/24/_somaliland.png has changed
Binary file static/flags/24/_south-ossetia.png has changed
Binary file static/flags/24/_united-nations.png has changed
Binary file static/flags/24/_vatican.png has changed
Binary file static/flags/24/_wales.png has changed
Binary file static/flags/24/_world.png has changed
Binary file static/flags/24/ad.png has changed
Binary file static/flags/24/ae.png has changed
Binary file static/flags/24/af.png has changed
Binary file static/flags/24/ag.png has changed
Binary file static/flags/24/ai.png has changed
Binary file static/flags/24/al.png has changed
Binary file static/flags/24/am.png has changed
Binary file static/flags/24/an.png has changed
Binary file static/flags/24/ao.png has changed
Binary file static/flags/24/aq.png has changed
Binary file static/flags/24/ar.png has changed
Binary file static/flags/24/as.png has changed
Binary file static/flags/24/at.png has changed
Binary file static/flags/24/au.png has changed
Binary file static/flags/24/aw.png has changed
Binary file static/flags/24/ax.png has changed
Binary file static/flags/24/az.png has changed
Binary file static/flags/24/ba.png has changed
Binary file static/flags/24/bb.png has changed
Binary file static/flags/24/bd.png has changed
Binary file static/flags/24/be.png has changed
Binary file static/flags/24/bf.png has changed
Binary file static/flags/24/bg.png has changed
Binary file static/flags/24/bh.png has changed
Binary file static/flags/24/bi.png has changed
Binary file static/flags/24/bj.png has changed
Binary file static/flags/24/bl.png has changed
Binary file static/flags/24/bm.png has changed
Binary file static/flags/24/bn.png has changed
Binary file static/flags/24/bo.png has changed
Binary file static/flags/24/br.png has changed
Binary file static/flags/24/bs.png has changed
Binary file static/flags/24/bt.png has changed
Binary file static/flags/24/bw.png has changed
Binary file static/flags/24/by.png has changed
Binary file static/flags/24/bz.png has changed
Binary file static/flags/24/ca.png has changed
Binary file static/flags/24/cd.png has changed
Binary file static/flags/24/cf.png has changed
Binary file static/flags/24/cg.png has changed
Binary file static/flags/24/ch.png has changed
Binary file static/flags/24/ci.png has changed
Binary file static/flags/24/cl.png has changed
Binary file static/flags/24/cm.png has changed
Binary file static/flags/24/cn.png has changed
Binary file static/flags/24/co.png has changed
Binary file static/flags/24/cr.png has changed
Binary file static/flags/24/cu.png has changed
Binary file static/flags/24/cv.png has changed
Binary file static/flags/24/cy.png has changed
Binary file static/flags/24/cz.png has changed
Binary file static/flags/24/de.png has changed
Binary file static/flags/24/dj.png has changed
Binary file static/flags/24/dk.png has changed
Binary file static/flags/24/dm.png has changed
Binary file static/flags/24/do.png has changed
Binary file static/flags/24/dz.png has changed
Binary file static/flags/24/ec.png has changed
Binary file static/flags/24/ee.png has changed
Binary file static/flags/24/eg.png has changed
Binary file static/flags/24/eh.png has changed
Binary file static/flags/24/er.png has changed
Binary file static/flags/24/es.png has changed
Binary file static/flags/24/et.png has changed
Binary file static/flags/24/fi.png has changed
Binary file static/flags/24/fj.png has changed
Binary file static/flags/24/fk.png has changed
Binary file static/flags/24/fm.png has changed
Binary file static/flags/24/fo.png has changed
Binary file static/flags/24/fr.png has changed
Binary file static/flags/24/ga.png has changed
Binary file static/flags/24/gb.png has changed
Binary file static/flags/24/gd.png has changed
Binary file static/flags/24/ge.png has changed
Binary file static/flags/24/gg.png has changed
Binary file static/flags/24/gh.png has changed
Binary file static/flags/24/gl.png has changed
Binary file static/flags/24/gm.png has changed
Binary file static/flags/24/gn.png has changed
Binary file static/flags/24/gq.png has changed
Binary file static/flags/24/gr.png has changed
Binary file static/flags/24/gs.png has changed
Binary file static/flags/24/gt.png has changed
Binary file static/flags/24/gu.png has changed
Binary file static/flags/24/gw.png has changed
Binary file static/flags/24/gy.png has changed
Binary file static/flags/24/hk.png has changed
Binary file static/flags/24/hn.png has changed
Binary file static/flags/24/hr.png has changed
Binary file static/flags/24/ht.png has changed
Binary file static/flags/24/hu.png has changed
Binary file static/flags/24/id.png has changed
Binary file static/flags/24/ie.png has changed
Binary file static/flags/24/il.png has changed
Binary file static/flags/24/im.png has changed
Binary file static/flags/24/in.png has changed
Binary file static/flags/24/iq.png has changed
Binary file static/flags/24/ir.png has changed
Binary file static/flags/24/is.png has changed
Binary file static/flags/24/it.png has changed
Binary file static/flags/24/je.png has changed
Binary file static/flags/24/jm.png has changed
Binary file static/flags/24/jo.png has changed
Binary file static/flags/24/jp.png has changed
Binary file static/flags/24/ke.png has changed
Binary file static/flags/24/kg.png has changed
Binary file static/flags/24/kh.png has changed
Binary file static/flags/24/ki.png has changed
Binary file static/flags/24/km.png has changed
Binary file static/flags/24/kn.png has changed
Binary file static/flags/24/kp.png has changed
Binary file static/flags/24/kr.png has changed
Binary file static/flags/24/kw.png has changed
Binary file static/flags/24/ky.png has changed
Binary file static/flags/24/kz.png has changed
Binary file static/flags/24/la.png has changed
Binary file static/flags/24/lb.png has changed
Binary file static/flags/24/lc.png has changed
Binary file static/flags/24/li.png has changed
Binary file static/flags/24/lk.png has changed
Binary file static/flags/24/lr.png has changed
Binary file static/flags/24/ls.png has changed
Binary file static/flags/24/lt.png has changed
Binary file static/flags/24/lu.png has changed
Binary file static/flags/24/lv.png has changed
Binary file static/flags/24/ly.png has changed
Binary file static/flags/24/ma.png has changed
Binary file static/flags/24/mc.png has changed
Binary file static/flags/24/md.png has changed
Binary file static/flags/24/me.png has changed
Binary file static/flags/24/mg.png has changed
Binary file static/flags/24/mh.png has changed
Binary file static/flags/24/mk.png has changed
Binary file static/flags/24/ml.png has changed
Binary file static/flags/24/mm.png has changed
Binary file static/flags/24/mn.png has changed
Binary file static/flags/24/mo.png has changed
Binary file static/flags/24/mp.png has changed
Binary file static/flags/24/mr.png has changed
Binary file static/flags/24/ms.png has changed
Binary file static/flags/24/mt.png has changed
Binary file static/flags/24/mu.png has changed
Binary file static/flags/24/mv.png has changed
Binary file static/flags/24/mw.png has changed
Binary file static/flags/24/mx.png has changed
Binary file static/flags/24/my.png has changed
Binary file static/flags/24/mz.png has changed
Binary file static/flags/24/na.png has changed
Binary file static/flags/24/ne.png has changed
Binary file static/flags/24/nf.png has changed
Binary file static/flags/24/ng.png has changed
Binary file static/flags/24/ni.png has changed
Binary file static/flags/24/nl.png has changed
Binary file static/flags/24/no.png has changed
Binary file static/flags/24/np.png has changed
Binary file static/flags/24/nr.png has changed
Binary file static/flags/24/nz.png has changed
Binary file static/flags/24/om.png has changed
Binary file static/flags/24/pa.png has changed
Binary file static/flags/24/pe.png has changed
Binary file static/flags/24/pg.png has changed
Binary file static/flags/24/ph.png has changed
Binary file static/flags/24/pk.png has changed
Binary file static/flags/24/pl.png has changed
Binary file static/flags/24/pn.png has changed
Binary file static/flags/24/pr.png has changed
Binary file static/flags/24/ps.png has changed
Binary file static/flags/24/pt.png has changed
Binary file static/flags/24/pw.png has changed
Binary file static/flags/24/py.png has changed
Binary file static/flags/24/qa.png has changed
Binary file static/flags/24/ro.png has changed
Binary file static/flags/24/rs.png has changed
Binary file static/flags/24/ru.png has changed
Binary file static/flags/24/rw.png has changed
Binary file static/flags/24/sa.png has changed
Binary file static/flags/24/sb.png has changed
Binary file static/flags/24/sc.png has changed
Binary file static/flags/24/sd.png has changed
Binary file static/flags/24/se.png has changed
Binary file static/flags/24/sg.png has changed
Binary file static/flags/24/sh.png has changed
Binary file static/flags/24/si.png has changed
Binary file static/flags/24/sk.png has changed
Binary file static/flags/24/sl.png has changed
Binary file static/flags/24/sm.png has changed
Binary file static/flags/24/sn.png has changed
Binary file static/flags/24/so.png has changed
Binary file static/flags/24/sr.png has changed
Binary file static/flags/24/st.png has changed
Binary file static/flags/24/sv.png has changed
Binary file static/flags/24/sy.png has changed
Binary file static/flags/24/sz.png has changed
Binary file static/flags/24/tc.png has changed
Binary file static/flags/24/td.png has changed
Binary file static/flags/24/tg.png has changed
Binary file static/flags/24/th.png has changed
Binary file static/flags/24/tj.png has changed
Binary file static/flags/24/tl.png has changed
Binary file static/flags/24/tm.png has changed
Binary file static/flags/24/tn.png has changed
Binary file static/flags/24/to.png has changed
Binary file static/flags/24/tr.png has changed
Binary file static/flags/24/tt.png has changed
Binary file static/flags/24/tv.png has changed
Binary file static/flags/24/tw.png has changed
Binary file static/flags/24/tz.png has changed
Binary file static/flags/24/ua.png has changed
Binary file static/flags/24/ug.png has changed
Binary file static/flags/24/us.png has changed
Binary file static/flags/24/uy.png has changed
Binary file static/flags/24/uz.png has changed
Binary file static/flags/24/vc.png has changed
Binary file static/flags/24/ve.png has changed
Binary file static/flags/24/vg.png has changed
Binary file static/flags/24/vi.png has changed
Binary file static/flags/24/vn.png has changed
Binary file static/flags/24/vu.png has changed
Binary file static/flags/24/ws.png has changed
Binary file static/flags/24/ye.png has changed
Binary file static/flags/24/za.png has changed
Binary file static/flags/24/zm.png has changed
Binary file static/flags/24/zw.png has changed
Binary file static/flags/64/_abkhazia.png has changed
Binary file static/flags/64/_commonwealth.png has changed
Binary file static/flags/64/_england.png has changed
Binary file static/flags/64/_european-union.png has changed
Binary file static/flags/64/_kosovo.png has changed
Binary file static/flags/64/_mars.png has changed
Binary file static/flags/64/_nagorno-karabakh.png has changed
Binary file static/flags/64/_nato.png has changed
Binary file static/flags/64/_northern-cyprus.png has changed
Binary file static/flags/64/_olympics.png has changed
Binary file static/flags/64/_red-cross.png has changed
Binary file static/flags/64/_scotland.png has changed
Binary file static/flags/64/_somaliland.png has changed
Binary file static/flags/64/_south-ossetia.png has changed
Binary file static/flags/64/_united-nations.png has changed
Binary file static/flags/64/_vatican.png has changed
Binary file static/flags/64/_wales.png has changed
Binary file static/flags/64/_world.png has changed
Binary file static/flags/64/ad.png has changed
Binary file static/flags/64/ae.png has changed
Binary file static/flags/64/af.png has changed
Binary file static/flags/64/ag.png has changed
Binary file static/flags/64/ai.png has changed
Binary file static/flags/64/al.png has changed
Binary file static/flags/64/am.png has changed
Binary file static/flags/64/an.png has changed
Binary file static/flags/64/ao.png has changed
Binary file static/flags/64/aq.png has changed
Binary file static/flags/64/ar.png has changed
Binary file static/flags/64/as.png has changed
Binary file static/flags/64/at.png has changed
Binary file static/flags/64/au.png has changed
Binary file static/flags/64/aw.png has changed
Binary file static/flags/64/ax.png has changed
Binary file static/flags/64/az.png has changed
Binary file static/flags/64/ba.png has changed
Binary file static/flags/64/bb.png has changed
Binary file static/flags/64/bd.png has changed
Binary file static/flags/64/be.png has changed
Binary file static/flags/64/bf.png has changed
Binary file static/flags/64/bg.png has changed
Binary file static/flags/64/bh.png has changed
Binary file static/flags/64/bi.png has changed
Binary file static/flags/64/bj.png has changed
Binary file static/flags/64/bl.png has changed
Binary file static/flags/64/bm.png has changed
Binary file static/flags/64/bn.png has changed
Binary file static/flags/64/bo.png has changed
Binary file static/flags/64/br.png has changed
Binary file static/flags/64/bs.png has changed
Binary file static/flags/64/bt.png has changed
Binary file static/flags/64/bw.png has changed
Binary file static/flags/64/by.png has changed
Binary file static/flags/64/bz.png has changed
Binary file static/flags/64/ca.png has changed
Binary file static/flags/64/cd.png has changed
Binary file static/flags/64/cf.png has changed
Binary file static/flags/64/cg.png has changed
Binary file static/flags/64/ch.png has changed
Binary file static/flags/64/ci.png has changed
Binary file static/flags/64/cl.png has changed
Binary file static/flags/64/cm.png has changed
Binary file static/flags/64/cn.png has changed
Binary file static/flags/64/co.png has changed
Binary file static/flags/64/cr.png has changed
Binary file static/flags/64/cu.png has changed
Binary file static/flags/64/cv.png has changed
Binary file static/flags/64/cy.png has changed
Binary file static/flags/64/cz.png has changed
Binary file static/flags/64/de.png has changed
Binary file static/flags/64/dj.png has changed
Binary file static/flags/64/dk.png has changed
Binary file static/flags/64/dm.png has changed
Binary file static/flags/64/do.png has changed
Binary file static/flags/64/dz.png has changed
Binary file static/flags/64/ec.png has changed
Binary file static/flags/64/ee.png has changed
Binary file static/flags/64/eg.png has changed
Binary file static/flags/64/eh.png has changed
Binary file static/flags/64/er.png has changed
Binary file static/flags/64/es.png has changed
Binary file static/flags/64/et.png has changed
Binary file static/flags/64/fi.png has changed
Binary file static/flags/64/fj.png has changed
Binary file static/flags/64/fk.png has changed
Binary file static/flags/64/fm.png has changed
Binary file static/flags/64/fo.png has changed
Binary file static/flags/64/fr.png has changed
Binary file static/flags/64/ga.png has changed
Binary file static/flags/64/gb.png has changed
Binary file static/flags/64/gd.png has changed
Binary file static/flags/64/ge.png has changed
Binary file static/flags/64/gg.png has changed
Binary file static/flags/64/gh.png has changed
Binary file static/flags/64/gl.png has changed
Binary file static/flags/64/gm.png has changed
Binary file static/flags/64/gn.png has changed
Binary file static/flags/64/gq.png has changed
Binary file static/flags/64/gr.png has changed
Binary file static/flags/64/gs.png has changed
Binary file static/flags/64/gt.png has changed
Binary file static/flags/64/gu.png has changed
Binary file static/flags/64/gw.png has changed
Binary file static/flags/64/gy.png has changed
Binary file static/flags/64/hk.png has changed
Binary file static/flags/64/hn.png has changed
Binary file static/flags/64/hr.png has changed
Binary file static/flags/64/ht.png has changed
Binary file static/flags/64/hu.png has changed
Binary file static/flags/64/id.png has changed
Binary file static/flags/64/ie.png has changed
Binary file static/flags/64/il.png has changed
Binary file static/flags/64/im.png has changed
Binary file static/flags/64/in.png has changed
Binary file static/flags/64/iq.png has changed
Binary file static/flags/64/ir.png has changed
Binary file static/flags/64/is.png has changed
Binary file static/flags/64/it.png has changed
Binary file static/flags/64/je.png has changed
Binary file static/flags/64/jm.png has changed
Binary file static/flags/64/jo.png has changed
Binary file static/flags/64/jp.png has changed
Binary file static/flags/64/ke.png has changed
Binary file static/flags/64/kg.png has changed
Binary file static/flags/64/kh.png has changed
Binary file static/flags/64/ki.png has changed
Binary file static/flags/64/km.png has changed
Binary file static/flags/64/kn.png has changed
Binary file static/flags/64/kp.png has changed
Binary file static/flags/64/kr.png has changed
Binary file static/flags/64/kw.png has changed
Binary file static/flags/64/ky.png has changed
Binary file static/flags/64/kz.png has changed
Binary file static/flags/64/la.png has changed
Binary file static/flags/64/lb.png has changed
Binary file static/flags/64/lc.png has changed
Binary file static/flags/64/li.png has changed
Binary file static/flags/64/lk.png has changed
Binary file static/flags/64/lr.png has changed
Binary file static/flags/64/ls.png has changed
Binary file static/flags/64/lt.png has changed
Binary file static/flags/64/lu.png has changed
Binary file static/flags/64/lv.png has changed
Binary file static/flags/64/ly.png has changed
Binary file static/flags/64/ma.png has changed
Binary file static/flags/64/mc.png has changed
Binary file static/flags/64/md.png has changed
Binary file static/flags/64/me.png has changed
Binary file static/flags/64/mg.png has changed
Binary file static/flags/64/mh.png has changed
Binary file static/flags/64/mk.png has changed
Binary file static/flags/64/ml.png has changed
Binary file static/flags/64/mm.png has changed
Binary file static/flags/64/mn.png has changed
Binary file static/flags/64/mo.png has changed
Binary file static/flags/64/mp.png has changed
Binary file static/flags/64/mr.png has changed
Binary file static/flags/64/ms.png has changed
Binary file static/flags/64/mt.png has changed
Binary file static/flags/64/mu.png has changed
Binary file static/flags/64/mv.png has changed
Binary file static/flags/64/mw.png has changed
Binary file static/flags/64/mx.png has changed
Binary file static/flags/64/my.png has changed
Binary file static/flags/64/mz.png has changed
Binary file static/flags/64/na.png has changed
Binary file static/flags/64/ne.png has changed
Binary file static/flags/64/nf.png has changed
Binary file static/flags/64/ng.png has changed
Binary file static/flags/64/ni.png has changed
Binary file static/flags/64/nl.png has changed
Binary file static/flags/64/no.png has changed
Binary file static/flags/64/np.png has changed
Binary file static/flags/64/nr.png has changed
Binary file static/flags/64/nz.png has changed
Binary file static/flags/64/om.png has changed
Binary file static/flags/64/pa.png has changed
Binary file static/flags/64/pe.png has changed
Binary file static/flags/64/pg.png has changed
Binary file static/flags/64/ph.png has changed
Binary file static/flags/64/pk.png has changed
Binary file static/flags/64/pl.png has changed
Binary file static/flags/64/pn.png has changed
Binary file static/flags/64/pr.png has changed
Binary file static/flags/64/ps.png has changed
Binary file static/flags/64/pt.png has changed
Binary file static/flags/64/pw.png has changed
Binary file static/flags/64/py.png has changed
Binary file static/flags/64/qa.png has changed
Binary file static/flags/64/ro.png has changed
Binary file static/flags/64/rs.png has changed
Binary file static/flags/64/ru.png has changed
Binary file static/flags/64/rw.png has changed
Binary file static/flags/64/sa.png has changed
Binary file static/flags/64/sb.png has changed
Binary file static/flags/64/sc.png has changed
Binary file static/flags/64/sd.png has changed
Binary file static/flags/64/se.png has changed
Binary file static/flags/64/sg.png has changed
Binary file static/flags/64/sh.png has changed
Binary file static/flags/64/si.png has changed
Binary file static/flags/64/sk.png has changed
Binary file static/flags/64/sl.png has changed
Binary file static/flags/64/sm.png has changed
Binary file static/flags/64/sn.png has changed
Binary file static/flags/64/so.png has changed
Binary file static/flags/64/sr.png has changed
Binary file static/flags/64/st.png has changed
Binary file static/flags/64/sv.png has changed
Binary file static/flags/64/sy.png has changed
Binary file static/flags/64/sz.png has changed
Binary file static/flags/64/tc.png has changed
Binary file static/flags/64/td.png has changed
Binary file static/flags/64/tg.png has changed
Binary file static/flags/64/th.png has changed
Binary file static/flags/64/tj.png has changed
Binary file static/flags/64/tl.png has changed
Binary file static/flags/64/tm.png has changed
Binary file static/flags/64/tn.png has changed
Binary file static/flags/64/to.png has changed
Binary file static/flags/64/tr.png has changed
Binary file static/flags/64/tt.png has changed
Binary file static/flags/64/tv.png has changed
Binary file static/flags/64/tw.png has changed
Binary file static/flags/64/tz.png has changed
Binary file static/flags/64/ua.png has changed
Binary file static/flags/64/ug.png has changed
Binary file static/flags/64/us.png has changed
Binary file static/flags/64/uy.png has changed
Binary file static/flags/64/uz.png has changed
Binary file static/flags/64/vc.png has changed
Binary file static/flags/64/ve.png has changed
Binary file static/flags/64/vg.png has changed
Binary file static/flags/64/vi.png has changed
Binary file static/flags/64/vn.png has changed
Binary file static/flags/64/vu.png has changed
Binary file static/flags/64/ws.png has changed
Binary file static/flags/64/ye.png has changed
Binary file static/flags/64/za.png has changed
Binary file static/flags/64/zm.png has changed
Binary file static/flags/64/zw.png has changed
--- a/tools/flag_data.py	Thu Jul 26 14:18:10 2012 -0500
+++ b/tools/flag_data.py	Sat Jul 28 15:12:09 2012 -0500
@@ -8,6 +8,7 @@
 import argparse
 import json
 import os.path
+import sys
 from xml.etree.ElementTree import ElementTree
 
 
@@ -34,7 +35,7 @@
         # see if we have an icon for this country
 
         if not os.path.exists(os.path.join(icon_dir, '%s.png' % code)):
-            print "Could not find icon for %s (%s)" % (name, code)
+            sys.stderr.write("Could not find icon for %s (%s)\n" % (name, code))
         else:
             country_data[code] = name