diff bio/models.py @ 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 ee87ea74d46b
children 08d905e38a86
line wrap: on
line diff
--- 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)