1
0
mirror of https://github.com/djohnlewis/stackdump synced 2024-12-04 15:07:36 +00:00

Added a setting to disable the rewriting of links and image URLs.

This commit is contained in:
Samuel Lai 2014-02-27 18:52:25 +11:00
parent a4c6c2c7ba
commit 7764f088c2
3 changed files with 8 additions and 1 deletions

View File

@ -410,7 +410,8 @@ def view_question(site_key, question_id, answer_id=None):
result = results.docs[0]
convert_comments_to_html(result)
rewrite_result(result)
if settings.REWRITE_LINKS_AND_IMAGES:
rewrite_result(result)
sort_answers(result)
context['result'] = result

View File

@ -32,6 +32,9 @@ NUM_OF_DEFAULT_COMMENTS = 3
# number of random questions to show on search query pages
NUM_OF_RANDOM_QUESTIONS = 3
# rewrite links and images to point internally or to a placeholder respectively
REWRITE_LINKS_AND_IMAGES = True
# settings that are available in templates
TEMPLATE_SETTINGS = [
'APP_URL_ROOT',

View File

@ -34,3 +34,6 @@ from default_settings import *
# number of random questions to show on search query pages
#NUM_OF_RANDOM_QUESTIONS = 3
# rewrite links and images to point internally or to a placeholder respectively
#REWRITE_LINKS_AND_IMAGES = True