##// END OF EJS Templates
Added info about attachments
neko259 -
r840:78400567 decentral
parent child Browse files
Show More
@@ -57,6 +57,8 b" TAG_NEXT = 'next'"
57 57 TAG_SIGNATURES = 'signatures'
58 58 TAG_SIGNATURE = 'signature'
59 59 TAG_CONTENT = 'content'
60 TAG_ATTACHMENTS = 'attachments'
61 TAG_ATTACHMENT = 'attachment'
60 62
61 63 TYPE_GET = 'get'
62 64
@@ -64,6 +66,7 b" ATTR_VERSION = 'version'"
64 66 ATTR_TYPE = 'type'
65 67 ATTR_NAME = 'name'
66 68 ATTR_VALUE = 'value'
69 ATTR_MIMETYPE = 'mimetype'
67 70
68 71 STATUS_SUCCESS = 'success'
69 72
@@ -238,6 +241,9 b' class PostManager(models.Manager):'
238 241 if not post.is_opening():
239 242 thread = et.SubElement(content_tag, TAG_THREAD)
240 243 thread.text = str(post.get_thread().get_opening_post_id())
244 else:
245 # TODO Output tags here
246 pass
241 247
242 248 pub_time = et.SubElement(content_tag, TAG_PUB_TIME)
243 249 pub_time.text = str(post.get_pub_time_epoch())
@@ -16,6 +16,19 b''
16 16 <text>Thirteen</text>
17 17 <thread>id1/12</thread>
18 18 <pub-time>12</pub-time>
19 <!--
20 Images are saved as attachments and included in the
21 signature.
22 -->
23 <attachments>
24 <attachment mimetype="image/png" name="12345.png">
25 TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0
26 aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1
27 c3Qgb2YgdGhlIG1pbmQsIHRoYXQgYnkgYSBwZXJzZXZlcmFuY2Ugb2YgZGVsaWdodCBpbiB0
28 aGUgY29udGludWVkIGFuZCBpbmRlZmF0aWdhYmxlIGdlbmVyYXRpb24gb2Yga25vd2xlZGdl
29 LCBleGNlZWRzIHRoZSBzaG9ydCB2ZWhlbWVuY2Ugb2YgYW55IGNhcm5hbCBwbGVhc3VyZS4=
30 </attachment>
31 </attachments>
19 32 </content>
20 33 <!--
21 34 There can be several signatures for one model. At least one
General Comments 0
You need to be logged in to leave comments. Login now