damned-lies r1100 - in branches/djamnedlies: . stats



Author: stephaner
Date: Sun Oct 26 08:59:15 2008
New Revision: 1100
URL: http://svn.gnome.org/viewvc/damned-lies?rev=1100&view=rev

Log:
2008-10-26  StÃphane Raimbault  <stephane raimbault gmail com>

	* stats/models.py: Fix plural forms in admin interface.


Modified:
   branches/djamnedlies/ChangeLog
   branches/djamnedlies/stats/models.py

Modified: branches/djamnedlies/stats/models.py
==============================================================================
--- branches/djamnedlies/stats/models.py	(original)
+++ branches/djamnedlies/stats/models.py	Sun Oct 26 08:59:15 2008
@@ -170,6 +170,7 @@
 
     class Meta:
         db_table = 'branch'
+        verbose_name_plural = "branches"
     
     def __unicode__(self):
         return "Branch: %s" % self.name
@@ -705,16 +706,16 @@
     class Meta:
         db_table = 'category'
         ordering = ('release',)
+        verbose_name_plural = "categories"
 
     def __unicode__(self):
         return "%s (%s)" % (self.description, self.release)
 
 
 class Statistics(models.Model):
-    # After migration, module, domain, type, branch, language can be deleted
-    branch = models.ForeignKey(Branch) #alter table statistics add branch_id integer REFERENCES "branch" ("id");
-    domain = models.ForeignKey(Domain) #alter table statistics add domain_id integer REFERENCES "domain" ("id");
-    language = models.ForeignKey(Language, null=True) #alter table statistics add language_id integer REFERENCES "language" ("id");
+    branch = models.ForeignKey(Branch)
+    domain = models.ForeignKey(Domain)
+    language = models.ForeignKey(Language, null=True)
     
     date = models.DateTimeField(auto_now_add=True)
     translated = models.IntegerField(default=0)
@@ -723,6 +724,8 @@
 
     class Meta:
         db_table = 'statistics'
+        verbose_name = "statistics"
+        verbose_name_plural = verbose_name
 
     def __init__(self, *args, **kwargs):
         models.Model.__init__(self, *args, **kwargs)
@@ -922,6 +925,7 @@
     def module_description(self):
         return self.module.description
        
+
 class ArchivedStatistics(models.Model):
     Module = models.TextField(db_column='module')
     Type = models.CharField(db_column='type', max_length=3, choices=DOMAIN_TYPE_CHOICES)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]