summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-12-05 04:59:29 +0100
committerDan McGee <dan@archlinux.org>2012-12-05 04:59:29 +0100
commit4c699119820dfd060de6a0385e549f3397053548 (patch)
tree29ef541a8cbd7114a06218f2569d1908cdea0a7e
parentf7fe73eff01195d3b2d8cd7898e48384d331e12e (diff)
downloadarchweb-4c699119820dfd060de6a0385e549f3397053548.tar.gz
archweb-4c699119820dfd060de6a0385e549f3397053548.tar.xz
get_latest_by cleanups
Fix some that referenced non-existent attributes, and add the attribute to other models. Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--devel/models.py4
-rw-r--r--main/models.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/devel/models.py b/devel/models.py
index 9b6f07a..f30bba8 100644
--- a/devel/models.py
+++ b/devel/models.py
@@ -50,6 +50,7 @@ class UserProfile(models.Model):
class Meta:
db_table = 'user_profiles'
+ get_latest_by = 'last_modified'
verbose_name = 'Additional Profile Data'
verbose_name_plural = 'Additional Profile Data'
@@ -80,6 +81,7 @@ class MasterKey(models.Model):
class Meta:
ordering = ('created',)
+ get_latest_by = 'created'
def __unicode__(self):
return u'%s, created %s' % (
@@ -94,6 +96,8 @@ class PGPSignature(models.Model):
valid = models.BooleanField(default=True)
class Meta:
+ ordering = ('signer', 'signee')
+ get_latest_by = 'created'
verbose_name = 'PGP signature'
def __unicode__(self):
diff --git a/main/models.py b/main/models.py
index 603d7cc..8e705c5 100644
--- a/main/models.py
+++ b/main/models.py
@@ -46,7 +46,7 @@ class Donor(models.Model):
class Meta:
db_table = 'donors'
ordering = ('name',)
- get_latest_by = 'when'
+ get_latest_by = 'created'
class Arch(models.Model):