##// END OF EJS Templates
Added some minor info
neko259 -
r1238:a83ac0a9 decentral
parent child Browse files
Show More
@@ -71,7 +71,9 b' class SyncManager:'
71 71 signatures_tag = et.SubElement(model, TAG_SIGNATURES)
72 72 post_signatures = post.signature.all()
73 73 if post_signatures:
74 signatures = post.signatures
74 signatures = post_signatures
75 # TODO Adding signature to a post is not yet added. For now this
76 # block is useless
75 77 else:
76 78 # TODO Maybe the signature can be computed only once after
77 79 # the post is added? Need to add some on_save signal queue
@@ -100,7 +102,7 b' class SyncManager:'
100 102 for tag_model in tag_models:
101 103 tag_content = tag_model.find(TAG_CONTENT)
102 104
103 valid = SyncManager.verify_model(tag_content, tag_model)
105 valid = SyncManager._verify_model(tag_content, tag_model)
104 106
105 107 if not valid:
106 108 raise Exception('Invalid model signature')
@@ -128,6 +130,8 b' class SyncManager:'
128 130 # TODO Check that the replied posts are already present
129 131 # before adding new ones
130 132
133 # TODO Get images
134
131 135 post = Post.objects.import_post(
132 136 title=title, text=text, pub_time=pub_time,
133 137 opening_post=opening_post)
@@ -137,7 +141,7 b' class SyncManager:'
137 141 pass
138 142
139 143 @staticmethod
140 def verify_model(tag_content, tag_model):
144 def _verify_model(tag_content, tag_model):
141 145 """
142 146 Verifies all signatures for a single model.
143 147 """
General Comments 0
You need to be logged in to leave comments. Login now