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:
parent
a4c6c2c7ba
commit
7764f088c2
@ -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
|
||||
|
||||
|
@ -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',
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user