Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#20678 closed Bug (fixed)

Broken link for downloading docs as HTML

Reported by: Jenny Duckett Owned by: Jannis Leidel
Component: *.djangoproject.com Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The link to download the full docs as HTML at the bottom of the sidebar on many pages on docs.djangoproject.com is given as e.g. https://docs.djangoproject.com/s/docs/django-docs-1.5-en.7b52b2b9085f.zip but should be https://docs.djangoproject.com/s/docs/django-docs-1.5-en.zip - this applies to the links for all versions of Django.

Change History (7)

comment:1 by Baptiste Mispelon, 11 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Claude Paroz, 11 years ago

This is an artifact of the static template tag, introduced in https://github.com/django/djangoproject.com/commit/89b5cc54cbd1ad4ea512428197d1b788bfc3547a

comment:3 by Baptiste Mispelon, 11 years ago

This issue was introduced with commit https://github.com/django/djangoproject.com/commit/89b5cc54cbd1ad4ea512428197d1b788bfc3547a that switched the site to using CachedStaticFilesStorage.

Unfortunately, the code that generates thoses zip files (the update_docs command) is not using the staticfiles machinery, which broke the download links.

I see two solutions:

1) Revert the download link to use {{ STATIC_ROOT }} instead of {% static %}.
2) Change the update_docs command to make use of the staticfiles infrastructure (or at least generate a compatible filename).

I think 2) might be the better option, but after looking into it a bit, I found it tricky to implement.

comment:4 by Aymeric Augustin, 11 years ago

It could be more appropriate to treat the docs zip archives as media files.

There're a media attached to a DocumentRelease object.

comment:5 by Jannis Leidel, 11 years ago

Owner: changed from nobody to Jannis Leidel
Status: newassigned

comment:6 by Jannis Leidel <jannis@…>, 11 years ago

Resolution: fixed
Status: assignedclosed

comment:7 by Jannis Leidel, 11 years ago

FTR I agree with aaugustin, the download is a "media" IMO.

Note: See TracTickets for help on using tickets.
Back to Top