diff options
Diffstat (limited to 'askbot/views/readers.py')
-rw-r--r-- | askbot/views/readers.py | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/askbot/views/readers.py b/askbot/views/readers.py index 8d63ba51..faa6f3ba 100644 --- a/askbot/views/readers.py +++ b/askbot/views/readers.py @@ -424,7 +424,7 @@ def question(request, id):#refactor - long subroutine. display question body, an return HttpResponseRedirect(reverse('index')) elif show_answer: - #if the url calls to view a particular answer to + #if the url calls to view a particular answer to #question - we must check whether the question exists #whether answer is actually corresponding to the current question #and that the visitor is allowed to see it @@ -590,6 +590,9 @@ def question(request, id):#refactor - long subroutine. display question body, an 'show_comment': show_comment, 'show_comment_position': show_comment_position, } + #shared with ... + if askbot_settings.GROUPS_ENABLED: + data['sharing_info'] = thread.get_sharing_info() data.update(context.get_for_tag_editor()) @@ -631,20 +634,3 @@ def get_comment(request): comment = models.Post.objects.get(post_type='comment', id=id) request.user.assert_can_edit_comment(comment) return {'text': comment.text} - -def widget_questions(request): - """Returns the first x questions based on certain tags. - @returns template with those questions listed.""" - # make sure this is a GET request with the correct parameters. - if request.method != 'GET': - raise Http404 - threads = models.Thread.objects.all() - tags_input = request.GET.get('tags','').strip() - if len(tags_input) > 0: - tags = [tag.strip() for tag in tags_input.split(',')] - threads = threads.filter(tags__name__in=tags) - data = { - 'threads': threads[:askbot_settings.QUESTIONS_WIDGET_MAX_QUESTIONS] - } - return render_into_skin('question_widget.html', data, request) - |