Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@sugarlabs.org>2012-03-19 22:56:25 (GMT)
committer Aleksey Lim <alsroot@sugarlabs.org>2012-03-19 22:56:37 (GMT)
commit33795d11e7fe845d88078bf597553dacb23913d5 (patch)
treed34fec0989764764bf84a220244125cc1e851123
parenta34e339bc2ec16734371a3924fb2f71501cf8b45 (diff)
Move layer property to rd
-rw-r--r--TODO1
-rw-r--r--doc/objects.dia90
-rw-r--r--sugar_network_server/env.py1
-rw-r--r--sugar_network_server/resources/artifact.py4
-rw-r--r--sugar_network_server/resources/resource.py14
5 files changed, 25 insertions, 85 deletions
diff --git a/TODO b/TODO
index fb08af0..412ec42 100644
--- a/TODO
+++ b/TODO
@@ -5,6 +5,7 @@
- client library to launch activities
- total is the same in examples/client.py in network/client repo
- fix Vote.value()
+- ascii fails in prop values
1.0
===
diff --git a/doc/objects.dia b/doc/objects.dia
index f8e1168..4579ae3 100644
--- a/doc/objects.dia
+++ b/doc/objects.dia
@@ -997,7 +997,7 @@
</dia:composite>
<dia:composite type="umlattribute">
<dia:attribute name="name">
- <dia:string>#layer#</dia:string>
+ <dia:string>#layers#</dia:string>
</dia:attribute>
<dia:attribute name="type">
<dia:string>#[enum] [R WA S]#</dia:string>
@@ -1212,7 +1212,7 @@
<dia:point val="39.3263,51"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="39.3086,50.24;40.1,54.84"/>
+ <dia:rectangle val="39.3087,50.24;40.1,54.84"/>
</dia:attribute>
<dia:attribute name="meta">
<dia:composite type="dict"/>
@@ -1719,7 +1719,7 @@
<dia:string>##</dia:string>
</dia:attribute>
<dia:attribute name="comment">
- <dia:string>#Did observer vote for this Context or not#</dia:string>
+ <dia:string>#Did observer vote for this Question or not#</dia:string>
</dia:attribute>
<dia:attribute name="visibility">
<dia:enum val="0"/>
@@ -1743,13 +1743,13 @@
<dia:point val="1,45"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="0.985,44.985;12.4375,59.015"/>
+ <dia:rectangle val="0.985,44.985;12.1725,59.015"/>
</dia:attribute>
<dia:attribute name="elem_corner">
<dia:point val="1,45"/>
</dia:attribute>
<dia:attribute name="elem_width">
- <dia:real val="11.422499999999999"/>
+ <dia:real val="11.157500000000001"/>
</dia:attribute>
<dia:attribute name="elem_height">
<dia:real val="14"/>
@@ -1948,7 +1948,7 @@
<dia:string>##</dia:string>
</dia:attribute>
<dia:attribute name="comment">
- <dia:string>#Did observer vote for this Context or not#</dia:string>
+ <dia:string>#Did observer vote for this Idea or not#</dia:string>
</dia:attribute>
<dia:attribute name="visibility">
<dia:enum val="0"/>
@@ -2200,7 +2200,7 @@
<dia:string>##</dia:string>
</dia:attribute>
<dia:attribute name="comment">
- <dia:string>#Did observer vote for this Context or not#</dia:string>
+ <dia:string>#Did observer vote for this Problem or not#</dia:string>
</dia:attribute>
<dia:attribute name="visibility">
<dia:enum val="0"/>
@@ -2429,7 +2429,7 @@
<dia:string>##</dia:string>
</dia:attribute>
<dia:attribute name="comment">
- <dia:string>#Did observer vote for this Context or not#</dia:string>
+ <dia:string>#Did observer vote for this Solution or not#</dia:string>
</dia:attribute>
<dia:attribute name="visibility">
<dia:enum val="0"/>
@@ -2530,17 +2530,17 @@
</dia:object>
<dia:object type="UML - Association" version="2" id="O14">
<dia:attribute name="obj_pos">
- <dia:point val="6.71125,59.0144"/>
+ <dia:point val="6.57875,59.0144"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="6.69361,58.9968;14.0563,65.8173"/>
+ <dia:rectangle val="6.56111,58.9968;14.0562,65.8173"/>
</dia:attribute>
<dia:attribute name="meta">
<dia:composite type="dict"/>
</dia:attribute>
<dia:attribute name="orth_points">
- <dia:point val="6.71125,59.0144"/>
- <dia:point val="6.71125,64"/>
+ <dia:point val="6.57875,59.0144"/>
+ <dia:point val="6.57875,64"/>
<dia:point val="13.8562,64"/>
<dia:point val="13.8562,65.0172"/>
</dia:attribute>
@@ -2875,7 +2875,7 @@
<dia:string>##</dia:string>
</dia:attribute>
<dia:attribute name="comment">
- <dia:string>#Did observer vote for this Context or not#</dia:string>
+ <dia:string>#Did observer vote for this Review or not#</dia:string>
</dia:attribute>
<dia:attribute name="visibility">
<dia:enum val="0"/>
@@ -3353,7 +3353,7 @@
<dia:point val="69,38"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="68.985,37.985;81.45,63.215"/>
+ <dia:rectangle val="68.985,37.985;81.45,61.215"/>
</dia:attribute>
<dia:attribute name="elem_corner">
<dia:point val="69,38"/>
@@ -3362,7 +3362,7 @@
<dia:real val="12.434999999999999"/>
</dia:attribute>
<dia:attribute name="elem_height">
- <dia:real val="25.200000000000003"/>
+ <dia:real val="23.200000000000003"/>
</dia:attribute>
<dia:attribute name="name">
<dia:string>#Artifact#</dia:string>
@@ -3549,29 +3549,6 @@
</dia:composite>
<dia:composite type="umlattribute">
<dia:attribute name="name">
- <dia:string>#mime_type#</dia:string>
- </dia:attribute>
- <dia:attribute name="type">
- <dia:string>#str [R WA S]#</dia:string>
- </dia:attribute>
- <dia:attribute name="value">
- <dia:string>##</dia:string>
- </dia:attribute>
- <dia:attribute name="comment">
- <dia:string>#`data` MIME type#</dia:string>
- </dia:attribute>
- <dia:attribute name="visibility">
- <dia:enum val="0"/>
- </dia:attribute>
- <dia:attribute name="abstract">
- <dia:boolean val="false"/>
- </dia:attribute>
- <dia:attribute name="class_scope">
- <dia:boolean val="false"/>
- </dia:attribute>
- </dia:composite>
- <dia:composite type="umlattribute">
- <dia:attribute name="name">
<dia:string>#preview#</dia:string>
</dia:attribute>
<dia:attribute name="type">
@@ -3650,7 +3627,7 @@
<dia:string>##</dia:string>
</dia:attribute>
<dia:attribute name="comment">
- <dia:string>#Did observer vote for this Context or not#</dia:string>
+ <dia:string>#Did observer vote for this Artifact or not#</dia:string>
</dia:attribute>
<dia:attribute name="visibility">
<dia:enum val="0"/>
@@ -3674,7 +3651,7 @@
<dia:point val="54,38"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="53.985,37.985;65.6275,68.015"/>
+ <dia:rectangle val="53.985,37.985;65.6275,64.415"/>
</dia:attribute>
<dia:attribute name="elem_corner">
<dia:point val="54,38"/>
@@ -3683,7 +3660,7 @@
<dia:real val="11.612500000000001"/>
</dia:attribute>
<dia:attribute name="elem_height">
- <dia:real val="30.000000000000007"/>
+ <dia:real val="26.400000000000006"/>
</dia:attribute>
<dia:attribute name="name">
<dia:string>#Implementation#</dia:string>
@@ -3939,29 +3916,6 @@
</dia:composite>
<dia:composite type="umlattribute">
<dia:attribute name="name">
- <dia:string>#url#</dia:string>
- </dia:attribute>
- <dia:attribute name="type">
- <dia:string>#str [R WN]#</dia:string>
- </dia:attribute>
- <dia:attribute name="value">
- <dia:string>##</dia:string>
- </dia:attribute>
- <dia:attribute name="comment">
- <dia:string>#Web url to download Implemnetation's bundle#</dia:string>
- </dia:attribute>
- <dia:attribute name="visibility">
- <dia:enum val="0"/>
- </dia:attribute>
- <dia:attribute name="abstract">
- <dia:boolean val="false"/>
- </dia:attribute>
- <dia:attribute name="class_scope">
- <dia:boolean val="false"/>
- </dia:attribute>
- </dia:composite>
- <dia:composite type="umlattribute">
- <dia:attribute name="name">
<dia:string>#bundle#</dia:string>
</dia:attribute>
<dia:attribute name="type">
@@ -3971,7 +3925,7 @@
<dia:string>##</dia:string>
</dia:attribute>
<dia:attribute name="comment">
- <dia:string>#If `url` is empty, this property should contain bundle#</dia:string>
+ <dia:string>#Contain implementation bundle#</dia:string>
</dia:attribute>
<dia:attribute name="visibility">
<dia:enum val="0"/>
@@ -4221,16 +4175,16 @@
</dia:object>
<dia:object type="UML - Association" version="2" id="O24">
<dia:attribute name="obj_pos">
- <dia:point val="59.8062,68"/>
+ <dia:point val="59.8062,64.4"/>
</dia:attribute>
<dia:attribute name="obj_bb">
- <dia:rectangle val="59.7886,67.9824;68.0176,73.14"/>
+ <dia:rectangle val="59.7886,64.3824;68.0176,73.14"/>
</dia:attribute>
<dia:attribute name="meta">
<dia:composite type="dict"/>
</dia:attribute>
<dia:attribute name="orth_points">
- <dia:point val="59.8062,68"/>
+ <dia:point val="59.8062,64.4"/>
<dia:point val="59.8062,72.3"/>
<dia:point val="68,72.3"/>
</dia:attribute>
diff --git a/sugar_network_server/env.py b/sugar_network_server/env.py
index 155f1a0..cb70623 100644
--- a/sugar_network_server/env.py
+++ b/sugar_network_server/env.py
@@ -16,7 +16,6 @@
VERSION = '0.1'
-LAYERS = ['general', 'deleted']
CONTEXT_TYPES = ['application', 'library', 'activity', 'article']
SOLUTION_PARENTS = ['question', 'idea', 'problem']
NOTIFICATION_TYPES = ['create', 'update', 'delete', 'vote']
diff --git a/sugar_network_server/resources/artifact.py b/sugar_network_server/resources/artifact.py
index fe3973f..7260475 100644
--- a/sugar_network_server/resources/artifact.py
+++ b/sugar_network_server/resources/artifact.py
@@ -50,10 +50,6 @@ class Artifact(Resource):
def description(self, value):
return value
- @ad.active_property(prefix='M')
- def mime_type(self, value):
- return value
-
@ad.active_property(ad.BlobProperty)
def preview(self, value):
return value
diff --git a/sugar_network_server/resources/resource.py b/sugar_network_server/resources/resource.py
index 753e3c5..2e2e3d4 100644
--- a/sugar_network_server/resources/resource.py
+++ b/sugar_network_server/resources/resource.py
@@ -20,7 +20,6 @@ from gettext import gettext as _
import active_document as ad
import restful_document as rd
-from sugar_network_server import env
enforce = ad.util.enforce
@@ -34,15 +33,6 @@ class Resource(rd.Document):
def author(self, value):
return value
- @ad.active_property(prefix='OL',
- default=[env.LAYERS[0]], typecast=[env.LAYERS])
- def layer(self, value):
- return value
-
- @layer.setter
- def layer(self, value):
- return value
-
@ad.active_property(prefix='OT', full_text=True, default=[], typecast=[])
def tags(self, value):
return value
@@ -52,10 +42,10 @@ class Resource(rd.Document):
return value
@rd.restful_method(method='PUT')
- def restful_put(self, prop=None):
+ def restful_put(self, prop=None, url=None):
enforce(rd.principal.user in self['author'],
rd.Forbidden, _('Access is not permitted for not authors'))
- rd.Document.restful_put(self, prop)
+ rd.Document.restful_put(self, prop, url)
@rd.restful_method(method='DELETE')
def restful_delete(self, prop=None):