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/index.rst | 49 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) (limited to 'docs/index.rst') diff --git a/docs/index.rst b/docs/index.rst index 04dec19..560d8af 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,11 +1,53 @@ -===================================== +================== django-wkhtmltopdf -===================================== +================== -Render PDFs in Django using the `wkhtmltopdf`_ library. +``django-wkhtmltopdf`` allows a Django site to output dynamic PDFs. It utilises +the wkhtmltopdf_ library, allowing you to write using the technologies you know +- HTML and CSS - and output a PDF file. .. _wkhtmltopdf: http://code.google.com/p/wkhtmltopdf/ +Quickstart +========== + +.. code-block:: bash + + pip install django-wkhtmltopdf + +Grab the wkhtmltopdf binary_ for your platform. + +.. _binary: http://code.google.com/p/wkhtmltopdf/downloads/list + +``settings.py`` + +.. code-block:: python + + INSTALLED_APPS = ( + # ... + 'wkhtmltopdf', + # ... + ) + +``urls.py`` + +.. code-block:: python + + from django.conf.urls.defaults import url, patterns + from wkhtmltopdf.views import PDFTemplateView + + urlpatterns = patterns('', + url(r'^pdf/$', PDFTemplateView.as_view(template_name='my_template.html', + filename='my_pdf.pdf'), name='pdf'), + ) + +Contribute +========== + +You can fork the project on Github_. + +.. _Github: http://github.com/incuna/django-wkhtmltopdf + Contents ======== @@ -14,4 +56,3 @@ Contents installation usage - -- cgit v1.2.3