~dpm/ubuntu-translations-stats/yui3

« back to all changes in this revision

Viewing changes to stats/models.py

  • Committer: David Planella
  • Date: 2012-02-23 21:54:29 UTC
  • Revision ID: david.planella@ubuntu.com-20120223215429-av12vvbjbcld1k3v
Added some visual indication of import progress, started documenting the models

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
 
5
5
class UbuntuRelease(models.Model):
 
6
    '''Model for Ubuntu releases
 
7
    
 
8
    Attributes:
 
9
    
 
10
    name -- the release's codename (e.g. 'precise')
 
11
    version -- the release's version (e.g. '12.04')
 
12
    active -- whether the release has reached its EOL
 
13
    
 
14
    '''
6
15
    name = models.SlugField(_("Name"), max_length=15)
7
16
    version = models.TextField(_("Version"), max_length=10)
8
17
    active = models.BooleanField(_("Active"))
18
27
 
19
28
 
20
29
class Language(models.Model):
 
30
    '''Model for natural languages, as stored in Launchpad
 
31
    
 
32
    Attributes:
 
33
 
 
34
    name -- the language name in English (e.g. Chinese (Simplified))
 
35
    visible -- whether the language is visible in Launchpad
 
36
    code -- ISO 639-2 2 or 3-letter code, followed by an optional ISO 3166-1
 
37
        country code (e.g. zh_CN)
 
38
    team_id -- Ubuntu translations team assigned to this language in Launchpad
 
39
    translators_count -- number of contributors to this language, as recorded
 
40
        by Launchpad
 
41
    
 
42
    '''
21
43
    name = models.TextField(_("Name"), max_length=70)
22
44
    visible = models.BooleanField(_("Visible"))
23
45
    code = models.SlugField(_("Code"), max_length=20)