From 4867d6bd6484c6bc1a263e49c3b08f3cfa30ff1d Mon Sep 17 00:00:00 2001 From: Marc Tamlyn Date: Tue, 17 Apr 2012 17:37:18 +0100 Subject: Updates to the docs. --- docs/installation.rst | 57 +++++++++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 31 deletions(-) (limited to 'docs/installation.rst') diff --git a/docs/installation.rst b/docs/installation.rst index 98aadc0..0cf448b 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -1,18 +1,19 @@ -Installation -============ +Full Installation Notes +======================= -Package -------- -PyPI -~~~~ +Installing the Package +---------------------- + +From PyPI +~~~~~~~~~ .. code-block:: bash pip install django-wkhtmltopdf -GitHub -~~~~~~ +From source +~~~~~~~~~~~ .. code-block:: bash @@ -21,38 +22,34 @@ GitHub python setup.py install -Binary ------- - -Find the relevant download link on the ``wkhtmltopdf`` project `downloads page`_. - -This requires libfontconfig (on Ubuntu: ``sudo aptitude install libfontconfig``). - -.. _downloads page: http://code.google.com/p/wkhtmltopdf/downloads/list +Installing the Binary +--------------------- -.. note:: +Find the relevant version of the ``wkhtmltopdf`` binary from the project +`downloads page`_. - The wkhtmltopdf downloads page can be quite confusing. Make sure you get - wkhtmltopdf (there are a few different libraries on there) and the correct platform. +You might need to install ``libfontconfig``. +You can alternatively install wkhtmltopdf from source via Homebrew or +apt-get/aptitude, but as this requires a full compilation of QT it's not +recommended. .. note:: - At the time of writing it was possible to install wkhtmltopdf from Homebrew - and apt-get/aptitude but required compilation of QT which can take quite a - while so the binary installation is recommended. - + The downloads page can be quite confusing. Make sure you get wkhtmltopdf + (there are a few different libraries on there) and the correct platform. .. note:: - There is an known issue on 64bit machines where wkhtmltopdf will fail + There is an known issue on 64bit machines where ``wkhtmltopdf`` will fail silently. `This page`_ details ways to get around this but the easiest way to fix the issue is to install the 32bit binary. +.. _downloads page: http://code.google.com/p/wkhtmltopdf/downloads/list .. _this page: http://code.google.com/p/wkhtmltopdf/wiki/static -Django ------- +Setting up your Django +---------------------- Add ``wkhtmltopdf`` to your ``INSTALLED_APPS``: @@ -64,13 +61,11 @@ Add ``wkhtmltopdf`` to your ``INSTALLED_APPS``: # ... ) -By default it will execute the first wkhtmltopdf command found on your ``PATH``. +By default it will try to execute the ``wkhtmltopdf`` command from your ``PATH``. -If you can't add wkhtmltopdf to your ``PATH``, you can set ``WKHTMLTOPDF_CMD`` to a specific execuatable: - -e.g.: in ``settings.py`` +If you can't add wkhtmltopdf to your ``PATH`` or you want to use some other +version, you can use the ``WKHTMLTOPDF_CMD`` setting: .. code-block:: python WKHTMLTOPDF_CMD = '/path/to/my/wkhtmltopdf' - -- cgit v1.2.3