diff options
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 - |