Commit 60221dcc by Ned Batchelder

Get the doc version from openedx.core.release, instead of an ini file

parent 3bb8061f
...@@ -4,9 +4,11 @@ Online Contextual Help. ...@@ -4,9 +4,11 @@ Online Contextual Help.
""" """
import ConfigParser import ConfigParser
from django.conf import settings
import logging import logging
from django.conf import settings
from openedx.core.release import doc_version
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
...@@ -76,7 +78,7 @@ def common_doc_url(request, config_file_object): # pylint: disable=unused-argum ...@@ -76,7 +78,7 @@ def common_doc_url(request, config_file_object): # pylint: disable=unused-argum
return "{url_base}/{language}/{version}/{page_path}".format( return "{url_base}/{language}/{version}/{page_path}".format(
url_base=doc_base_url, url_base=doc_base_url,
language=get_config_value_with_default("locales", settings.LANGUAGE_CODE), language=get_config_value_with_default("locales", settings.LANGUAGE_CODE),
version=config_file_object.get("help_settings", "version"), version=doc_version(),
page_path=get_config_value_with_default("pages", page_token), page_path=get_config_value_with_default("pages", page_token),
) )
...@@ -102,7 +104,7 @@ def common_doc_url(request, config_file_object): # pylint: disable=unused-argum ...@@ -102,7 +104,7 @@ def common_doc_url(request, config_file_object): # pylint: disable=unused-argum
# Construct and return the URL for the PDF link. # Construct and return the URL for the PDF link.
return "{pdf_base}/{version}/{pdf_file}".format( return "{pdf_base}/{version}/{pdf_file}".format(
pdf_base=pdf_base_url, pdf_base=pdf_base_url,
version=config_file_object.get("help_settings", "version"), version=doc_version(),
pdf_file=config_file_object.get("pdf_settings", "pdf_file"), pdf_file=config_file_object.get("pdf_settings", "pdf_file"),
) )
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
[help_settings] [help_settings]
# The optional DOC_LINK_BASE_URL configuration property will override url_base # The optional DOC_LINK_BASE_URL configuration property will override url_base
url_base = http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course url_base = http://edx.readthedocs.io/projects/open-edx-building-and-running-a-course
version = latest
# below are the pdf settings for the pdf file # below are the pdf settings for the pdf file
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
[help_settings] [help_settings]
# The optional DOC_LINK_BASE_URL configuration property will override url_base # The optional DOC_LINK_BASE_URL configuration property will override url_base
url_base = http://edx.readthedocs.io/projects/open-edx-learner-guide url_base = http://edx.readthedocs.io/projects/open-edx-learner-guide
version = latest
# below are the pdf settings for the pdf file # below are the pdf settings for the pdf file
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment