Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #20678 - Refer to the zip file correctly. Fixes a regression in…

…troduced in 89b5cc5 and 89b5cc5.
  • Loading branch information...
commit cbe6e5bf02563b0a9332361897f1ebd350a9fa11 1 parent 4a39ac0
Jannis Leidel jezdez authored
1  django_docs/settings.py
View
@@ -35,6 +35,7 @@
'django.core.context_processors.debug',
'django.core.context_processors.i18n',
'django.core.context_processors.static',
+ 'django.core.context_processors.media',
'django.contrib.messages.context_processors.messages',
'docs.context_processors.docs_version',
'django.core.context_processors.request',
4 docs/management/commands/update_docs.py
View
@@ -100,11 +100,11 @@ def handle_noargs(self, **kwargs):
#
# Create a zip file of the HTML build for offline reading.
- # This gets moved into STATIC_ROOT for downloading.
+ # This gets moved into MEDIA_ROOT for downloading.
#
html_build_dir = parent_build_dir.child('_build', 'html')
zipfile_name = 'django-docs-%s-%s.zip' % (release.version, release.lang)
- zipfile_path = Path(settings.STATIC_ROOT).child('docs', zipfile_name)
+ zipfile_path = Path(settings.MEDIA_ROOT).child('docs', zipfile_name)
if not zipfile_path.parent.exists():
zipfile_path.parent.mkdir(parents=True)
if verbosity >= 2:
2  docs/templates/docs/doc.html
View
@@ -183,7 +183,7 @@ <h2 id="comments">{% trans "Questions/Feedback" %}</h2>
<p>
{% if version == "dev" %}{% trans "Offline (development version):" %}
{% else %}{% blocktrans %}Offline (Django {{ version }}):{% endblocktrans %}{% endif %}
- <a href="{% static zipfile_path %}">HTML</a> |
+ <a href="{{ MEDIA_URL }}docs/django-docs-{{ version }}-{{ lang }}.zip">HTML</a> |
<a href="http://media.readthedocs.org/pdf/django/{{ rtd_version }}/django.pdf">PDF</a> |
<a href="http://media.readthedocs.org/epub/django/{{ rtd_version }}/django.epub">ePub</a>
<br>
1  docs/views.py
View
@@ -60,7 +60,6 @@ def document(request, lang, version, url):
'env': json.load(open(docroot.child('globalcontext.json'), 'rb')),
'lang': lang,
'version': version,
- 'zipfile_path': 'docs/django-docs-%s-%s.zip' % (version, lang),
'rtd_version': rtd_version,
'docurl': url,
'update_date': datetime.datetime.fromtimestamp(docroot.child('last_build').mtime()),
Please sign in to comment.
Something went wrong with that request. Please try again.