diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-04-02 02:11:14 -0400 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2013-04-02 02:11:14 -0400 |
commit | 6812490dd5c0d040cc4478f7f09a77b128fb621c (patch) | |
tree | 2978a7d2123df4df6eaac63bba907645b07077b7 | |
parent | ae1f49685f978051fcbeb4f2599d6a27f1b3a9ac (diff) | |
download | askbot-6812490dd5c0d040cc4478f7f09a77b128fb621c.tar.gz askbot-6812490dd5c0d040cc4478f7f09a77b128fb621c.tar.bz2 askbot-6812490dd5c0d040cc4478f7f09a77b128fb621c.zip |
added extra context to the questions page and to the question summary snippet
-rw-r--r-- | askbot/models/question.py | 2 | ||||
-rw-r--r-- | askbot/views/readers.py | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/askbot/models/question.py b/askbot/models/question.py index 455b0845..c772804a 100644 --- a/askbot/models/question.py +++ b/askbot/models/question.py @@ -1410,6 +1410,8 @@ class Thread(models.Model): 'search_state': DummySearchState(), 'visitor': visitor } + from askbot.views.context import get_extra as get_extra_context + context.update(get_extra_context('ASKBOT_QUESTION_SUMMARY_EXTRA_CONTEXT', None, context)) html = get_template('widgets/question_summary.html').render(context) # INFO: Timeout is set to 30 days: # * timeout=0/None is not a reliable cross-backend way to set infinite timeout diff --git a/askbot/views/readers.py b/askbot/views/readers.py index fc74c739..962e1dbb 100644 --- a/askbot/views/readers.py +++ b/askbot/views/readers.py @@ -238,6 +238,13 @@ def questions(request, **kwargs): 'feed_url': context_feed_url, } + extra_context = context.get_extra( + 'ASKBOT_QUESTIONS_PAGE_EXTRA_CONTEXT', + request, + template_data + ) + template_data.update(extra_context) + return render(request, 'main_page.html', template_data) |