[extensions-web] extensions: Remove old junk and reformat
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] extensions: Remove old junk and reformat
- Date: Mon, 6 Aug 2012 21:27:31 +0000 (UTC)
commit 8abd43b25d55de8aa9843a5277768f3388b74f9e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Aug 6 16:08:05 2012 -0300
extensions: Remove old junk and reformat
sweettooth/extensions/models.py | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/sweettooth/extensions/models.py b/sweettooth/extensions/models.py
index 77e20bf..3840313 100644
--- a/sweettooth/extensions/models.py
+++ b/sweettooth/extensions/models.py
@@ -16,8 +16,10 @@ import re
from sorl import thumbnail
(STATUS_UNREVIEWED,
- STATUS_REJECTED, STATUS_INACTIVE,
- STATUS_ACTIVE, STATUS_WAITING) = xrange(5)
+ STATUS_REJECTED,
+ STATUS_INACTIVE,
+ STATUS_ACTIVE,
+ STATUS_WAITING) = xrange(5)
STATUSES = {
STATUS_UNREVIEWED: u"Unreviewed",
@@ -27,9 +29,6 @@ STATUSES = {
STATUS_WAITING: u"Waiting for author",
}
-APPROVED_STATUSES = (STATUS_INACTIVE, STATUS_ACTIVE)
-REVIEWED_STATUSES = (STATUS_INACTIVE, STATUS_ACTIVE, STATUS_REJECTED)
-
def validate_uuid(uuid):
if re.match(r'[-a-zA-Z0-9 _]+$', uuid) is None:
return False
@@ -389,7 +388,7 @@ class ExtensionVersion(models.Model):
return STATUSES[self.status].lower()
def is_approved(self):
- return self.status in APPROVED_STATUSES
+ return self.status in (STATUS_ACTIVE, STATUS_INACTIVE)
def is_active(self):
return self.status == STATUS_ACTIVE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]