diff options
author | Marc Tamlyn <marc.tamlyn@gmail.com> | 2012-04-17 17:37:18 +0100 |
---|---|---|
committer | Marc Tamlyn <marc.tamlyn@gmail.com> | 2012-04-17 17:37:18 +0100 |
commit | 4867d6bd6484c6bc1a263e49c3b08f3cfa30ff1d (patch) | |
tree | 64d1ec15120cadae3a15f6158db17ca3b20b0f3b /docs/index.rst | |
parent | 8e5c613bd6c5648b6c66b17d3b7c12fed14dba6c (diff) | |
download | django-wkhtmltopdf-4867d6bd6484c6bc1a263e49c3b08f3cfa30ff1d.tar.gz django-wkhtmltopdf-4867d6bd6484c6bc1a263e49c3b08f3cfa30ff1d.tar.bz2 django-wkhtmltopdf-4867d6bd6484c6bc1a263e49c3b08f3cfa30ff1d.zip |
Updates to the docs.
Diffstat (limited to 'docs/index.rst')
-rw-r--r-- | docs/index.rst | 49 |
1 files changed, 45 insertions, 4 deletions
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 - |