Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar_network/model
diff options
context:
space:
mode:
Diffstat (limited to 'sugar_network/model')
-rw-r--r--sugar_network/model/artifact.py4
-rw-r--r--sugar_network/model/context.py6
2 files changed, 9 insertions, 1 deletions
diff --git a/sugar_network/model/artifact.py b/sugar_network/model/artifact.py
index 5dba159..e461c4d 100644
--- a/sugar_network/model/artifact.py
+++ b/sugar_network/model/artifact.py
@@ -40,6 +40,10 @@ class Artifact(db.Resource):
def description(self, value):
return value
+ @db.indexed_property(slot=2, default=0, acl=ACL.READ | ACL.CALC)
+ def downloads(self, value):
+ return value
+
@db.indexed_property(slot=3, typecast=model.RATINGS, default=0,
acl=ACL.READ | ACL.CALC)
def rating(self, value):
diff --git a/sugar_network/model/context.py b/sugar_network/model/context.py
index e885b53..869ad6c 100644
--- a/sugar_network/model/context.py
+++ b/sugar_network/model/context.py
@@ -89,7 +89,11 @@ class Context(db.Resource):
'mime_type': 'image/png',
})
- @db.indexed_property(slot=3, typecast=model.RATINGS, default=0,
+ @db.indexed_property(slot=3, default=0, acl=ACL.READ | ACL.CALC)
+ def downloads(self, value):
+ return value
+
+ @db.indexed_property(slot=4, typecast=model.RATINGS, default=0,
acl=ACL.READ | ACL.CALC)
def rating(self, value):
return value