Skip to content

Commit 16946a2

Browse files
author
Chris Glass
committed
Added the first "wrapping" stuff around the utils file.
1 parent 1897549 commit 16946a2

File tree

7 files changed

+27
-0
lines changed

7 files changed

+27
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.pyc
2+
*.swp

LICENSE

Whitespace-only changes.

README.rst

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Django xhtml2pdf
2+
################
3+
4+
5+
THis project is wrapper code between the django project and the xhtml2pdf
6+
project.
7+
8+
What it does is simply allow people to create xhtml2pdf templates using all the
9+
cool django things like STATIC_URL etc.. (like one would for a webpage
10+
template), and the utils function makes all the images and ressources appear in
11+
the pdf.
12+
13+
Usage
14+
=====
15+
16+
Simply do the following::
17+
18+
from django_xhtml2pdf.utils import generate_pdf
19+
20+
def myview(response):
21+
resp = HttpResponse(content_type='application/pdf')
22+
result = generate_pdf('my_template.html', file_object=resp)
23+
return result
24+

django_xhtml2pdf/.utils.py.swp

12 KB
Binary file not shown.

django_xhtml2pdf/__init__.py

Whitespace-only changes.

django_xhtml2pdf/models.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Just to let Django pick this up as an app
File renamed without changes.

0 commit comments

Comments
 (0)