# HG changeset patch # User neko259 # Date 2015-02-04 16:15:00 # Node ID af7d403c7b042c99ec0ffd0441f6174f78c95917 # Parent 2c13ae0a1b326244d3606fe6b81a847a8ba34025 Added bumpable and archived attributes to the thread API output diff --git a/boards/views/api.py b/boards/views/api.py --- a/boards/views/api.py +++ b/boards/views/api.py @@ -152,8 +152,11 @@ def api_get_threads(request, count): opening_post = thread.get_opening_post() # TODO Add tags, replies and images count - opening_posts.append(get_post_data(opening_post.id, - include_last_update=True)) + post_data = get_post_data(opening_post.id, include_last_update=True) + post_data['bumpable'] = thread.can_bump() + post_data['archived'] = thread.archived + + opening_posts.append(post_data) return HttpResponse(content=json.dumps(opening_posts))