Commit 51b73cce authored by Aymeric Barantal's avatar Aymeric Barantal
Browse files

use normalized language list

parent d2be7fff
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
LANGUAGES = map(lambda (k, v): (k, _(v)), settings.LANGUAGES)
class Contact(models.Model):
......@@ -21,7 +26,9 @@ class Campaign(models.Model):
description = models.CharField(max_length=512, blank=True)
start_date = models.DateField()
end_date = models.DateField()
default_lang = models.CharField(max_length=5)
default_lang = models.CharField(max_length=5,
def __unicode__(self):
return self.title
......@@ -31,7 +38,9 @@ class Argumentary(models.Model):
"""Argumentary in a given language for a campaign"""
id = models.AutoField(primary_key=True)
campaign = models.ForeignKey(Campaign)
lang = models.CharField(max_length=255)
lang = models.CharField(max_length=5,
text = models.TextField(null=True)
def __unicode__(self):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment