diff options
author | Dan McGee <dan@archlinux.org> | 2012-10-26 17:11:11 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-10-26 17:11:11 -0500 |
commit | bdee24b9d1279de67dd238e3644c2efff314bd7b (patch) | |
tree | df6fd4b2fbc8787f984611708d8372efc13284b4 | |
parent | 2ee662c77cf559d6ea82c9096533abfcd38f4801 (diff) |
Cleanup meta model attributes
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | main/models.py | 5 | ||||
-rw-r--r-- | news/models.py | 2 | ||||
-rw-r--r-- | packages/models.py | 7 |
3 files changed, 8 insertions, 6 deletions
diff --git a/main/models.py b/main/models.py index 00549268..5700cdf1 100644 --- a/main/models.py +++ b/main/models.py @@ -62,7 +62,7 @@ class Arch(models.Model): class Meta: db_table = 'arches' - ordering = ['name'] + ordering = ('name',) verbose_name_plural = 'arches' @@ -87,8 +87,7 @@ class Repo(models.Model): class Meta: db_table = 'repos' - ordering = ['name'] - verbose_name_plural = 'repos' + ordering = ('name',) class Package(models.Model): diff --git a/news/models.py b/news/models.py index 2efea579..91232706 100644 --- a/news/models.py +++ b/news/models.py @@ -24,7 +24,7 @@ class News(models.Model): db_table = 'news' verbose_name_plural = 'news' get_latest_by = 'postdate' - ordering = ['-postdate'] + ordering = ('-postdate',) def set_news_fields(sender, **kwargs): news = kwargs['instance'] diff --git a/packages/models.py b/packages/models.py index 0bea21b1..0d0fbdf2 100644 --- a/packages/models.py +++ b/packages/models.py @@ -329,6 +329,9 @@ class PackageGroup(models.Model): def __unicode__(self): return "%s: %s" % (self.name, self.pkg) + class Meta: + ordering = ('name',) + class License(models.Model): pkg = models.ForeignKey(Package, related_name='licenses') @@ -338,7 +341,7 @@ class License(models.Model): return self.name class Meta: - ordering = ['name'] + ordering = ('name',) class RelatedToBase(models.Model): @@ -435,7 +438,7 @@ class RelatedToBase(models.Model): class Meta: abstract = True - ordering = ['name'] + ordering = ('name',) class Depend(RelatedToBase): |