aboutsummaryrefslogtreecommitdiffstats
path: root/wkhtmltopdf/tests.py
Commit message (Collapse)AuthorAgeFilesLines
* PDFTemplateView.cmd_options contains all the options to pass to wkhtmltopdfSimon Law2012-07-241-0/+26
| | | | | | | | | | | | | | | | | | | | Before, command-line arguments were class-based. Unfortunately, this means that you cannot add new command-line arguments without subclassing. Instead, PDFTemplateView.cmd_options is a dictionary of all command-line arguments. PDFTemplateView.as_view(cmd_options={...}) now works as expected. !!!! WARNING !!!! cmd_options is now empty, leaving wkhtmltopdf with its default behaviour. Explicitly add the options you want. Existing subclasses of PDFTemplateView will now break, but a PendingDeprecationWarning will be issued. Margins will now be wkhtmltopdf's default of 10mm. PdfTemplateView contains a compatibility shim with the old default values for margins and orientation.
* Move testproject to wkhtmltopdf._testproject.Simon Law2012-07-241-2/+2
| | | | | | | | | | | | | | | Avoid polluting the global library namespace with testproject. Instead, since wkhtmltopdf tests use it, we install it within under a "private" name. --HG-- rename : testproject/__init__.py => wkhtmltopdf/_testproject/__init__.py rename : testproject/manage.py => wkhtmltopdf/_testproject/manage.py rename : testproject/requirements.txt => wkhtmltopdf/_testproject/requirements.txt rename : testproject/settings.py => wkhtmltopdf/_testproject/settings.py rename : testproject/templates/footer.html => wkhtmltopdf/_testproject/templates/footer.html rename : testproject/templates/sample.html => wkhtmltopdf/_testproject/templates/sample.html rename : testproject/urls.py => wkhtmltopdf/_testproject/urls.py
* PDFTemplateResponse and PDFTemplateView now match Django's implementationsSimon Law2012-07-241-3/+113
| | | | | | | | | PDFTemplateResponse is like TemplateResponse in that it does dynamic rendering of a template on the fly. PDFTemplateView has a much smaller implementation, relying on PDFTemplateResponse to do the rendering for it. It also knows about the standard TemplateResponse when it needs to render the HTML version.
* PDFResponse is more robust:Simon Law2012-07-231-1/+41
| | | | | | | * Now matches HttpResponse in function signature. * Modern Django content_type/mimetype handling. * Sanitizes and quotes filenames in Content-Disposition header. * Tests.
* Remove extraneous StringIO import.Simon Law2012-07-201-1/+0
|
* Use warnings.warn instead of raising PendingDeprecationWarnings.Simon Law2012-07-201-0/+22
|
* Reliable command-line argument parsing for wkhtmltopdf().Simon Law2012-07-201-2/+36
| | | | | | The API for wkhtmltopdf has changed. Long arguments that take no parameters now use True and not the empty string. In addition, argument-parameters may now be Unicode.
* test_wkhtmltopdf tests that wkhtmltopdf generates a PDF.Simon Law2012-07-201-1/+13
|
* test_template_to_temp_file tries to clean up after itself.Simon Law2012-07-201-5/+13
|
* Test translation to temp file.Marc Tamlyn2012-01-161-0/+13
|
* Add a testproject and empty tests file.Marc Tamlyn2012-01-161-0/+0