Show More
@@ -134,10 +134,8 b' def api_get_threads(request, count):' | |||||
134 | 'text': opening_post.text.rendered, |
|
134 | 'text': opening_post.text.rendered, | |
135 | } |
|
135 | } | |
136 | if opening_post.image: |
|
136 | if opening_post.image: | |
137 | post_json += { |
|
137 | post_json['image'] = opening_post.image.url | |
138 |
|
|
138 | post_json['image_preview'] = opening_post.image.url_200x150 | |
139 | 'image_preview': opening_post.image.url_200x150, |
|
|||
140 | } |
|
|||
141 | opening_posts.append(post_json) |
|
139 | opening_posts.append(post_json) | |
142 |
|
140 | |||
143 | return HttpResponse(content=json.dumps(opening_posts)) |
|
141 | return HttpResponse(content=json.dumps(opening_posts)) | |
@@ -180,10 +178,8 b' def api_get_thread_posts(request, openin' | |||||
180 | 'text': post.text.rendered, |
|
178 | 'text': post.text.rendered, | |
181 | } |
|
179 | } | |
182 | if post.image: |
|
180 | if post.image: | |
183 |
post_json |
|
181 | post_json['image'] = post.image.url | |
184 |
|
|
182 | post_json['image_preview'] = post.image.url_200x150 | |
185 | 'image_preview': post.image.url_200x150, |
|
|||
186 | } |
|
|||
187 | json_post_list.append(post_json) |
|
183 | json_post_list.append(post_json) | |
188 |
|
184 | |||
189 | return HttpResponse(content=json.dumps(json_post_list)) |
|
185 | return HttpResponse(content=json.dumps(json_post_list)) |
General Comments 0
You need to be logged in to leave comments.
Login now