Opened 13 years ago

Closed 10 years ago

#14950 closed Bug (duplicate)

Javascript errors when building CHM file from django docs using Sphinx

Reported by: Aryeh Leib Taurog <vim@…> Owned by: nobody
Component: Documentation Version: 1.2
Severity: Normal Keywords: chm javascript
Cc: vim@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Sphinx 1.0.3
Python 2.5.2
Django 1.2.3 and 1.2.4

I tried generating a chm of the django documentation, but when I opened it, I got a js error 'jQuery' is undefined.
I can see that the only script referenced in the html is templatebuiltins.js, (it seems that is generated by a django extension which isn't used for htmlhelp).

I tried changing the link in the html files to point to a js bundle with the contents of the following files (in order):

_static/jquery.js
_static/underscore.js
_static/doctools.js
_static/searchtools.js

I also threw in a declaration of django_template_builtins, but I'm still getting other errors. My guess is that most of the javascript isn't really necessary in the chm, which is very easy to navigate and search as is.

Ultimately, I just removed all the script tags from the html files and recompiled the chm.

I think it would be nice to be able to generate an error-free chm without so much effort.

Change History (8)

comment:1 by Aryeh Leib Taurog <vim@…>, 13 years ago

Looks like it is just a question of pointing the htmlhelp builder to a version of the layout.html template which doesn't contain the script tags.

Is there an easy way to specify different templates for different builders?

comment:2 by Gabriel Hurley, 13 years ago

Summary: Javascript errors in django docs chmJavascript errors when building CHM file from django docs using Sphinx
Triage Stage: UnreviewedAccepted

comment:3 by Aryeh Leib Taurog <vim@…>, 13 years ago

Cc: vim@… added

comment:4 by anonymous, 13 years ago

Severity: Normal
Type: Bug

comment:5 by Aymeric Augustin, 12 years ago

UI/UX: unset

Change UI/UX from NULL to False.

comment:6 by Aymeric Augustin, 12 years ago

Easy pickings: unset

Change Easy pickings from NULL to False.

comment:7 by Michał Pasternak, 10 years ago

Hi,

I know, 3 years are a long time.

Anyways, here's a patch, that makes CHM compilation readily available out of box https://github.com/mpasternak/django/commit/1336d8f8599f8d0571893c0bbd03f52f66eb36ef ,
and here's an issue I created for it https://code.djangoproject.com/ticket/21558

With kind regards,
Michal

comment:8 by Ramiro Morales, 10 years ago

Resolution: duplicate
Status: newclosed

I'm going to close this as duplicate of #21558 that, even if newer, has a patch and renewed energies.

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