xmpp.chapril.org-conversejs/lang/models.py
2012-02-29 13:46:25 +01:00

14 lines
439 B
Python

from django.db import models
class Language(models.Model):
code = models.SlugField(db_index = True)
name = models.CharField(max_length = 100)
nplurals = models.SmallIntegerField(default = 0)
pluralequation = models.CharField(max_length = 255, blank = True)
def __unicode__(self):
return self.name
def get_plural_form(self):
return 'nplurals=%d; plural=%s;' % (self.nplurals, self.pluralequation)