From 50a804f1e4c9b61bec5c7c7d0e8d6302bbfe027e Mon Sep 17 00:00:00 2001 From: Jeff Balogh Date: Mon, 4 Jan 2010 20:08:48 -0500 Subject: [PATCH] gave these models `modified` rows --- apps/addons/models.py | 5 +---- apps/approvals/models.py | 10 +++------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/apps/addons/models.py b/apps/addons/models.py index 735985401d..dea1f834da 100644 --- a/apps/addons/models.py +++ b/apps/addons/models.py @@ -1,5 +1,3 @@ -from datetime import datetime - from django.conf import settings from django.db import models @@ -106,10 +104,9 @@ class AddonType(amo.ModelBase): return unicode(self.name) -class BlacklistedGuid(models.Model): +class BlacklistedGuid(amo.ModelBase): guid = models.CharField(max_length=255, unique=True) - created = models.DateTimeField(default=datetime.now, editable=False) class Meta: db_table = 'blacklisted_guids' diff --git a/apps/approvals/models.py b/apps/approvals/models.py index c9cd65c592..e0ee49e848 100644 --- a/apps/approvals/models.py +++ b/apps/approvals/models.py @@ -2,12 +2,11 @@ from datetime import datetime from django.db import models -import caching +import amo -class Approval(caching.CachingMixin, models.Model): +class Approval(amo.ModelBase): - created = models.DateTimeField(default=datetime.now) reviewtype = models.CharField(max_length=10, default='pending') action = models.IntegerField(default=0) os = models.CharField(max_length=255, default='') @@ -19,8 +18,5 @@ class Approval(caching.CachingMixin, models.Model): #file = models.ForeignKey('files.File') reply_to = models.ForeignKey('self', null=True, db_column='reply_to') - objects = caching.CachingManager() - - class Meta: + class Meta(amo.ModelBase.Meta): db_table = 'approvals' - get_latest_by = 'created'