Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | PDFTemplateView actually renders headers and footers now. | Simon Law | 2012-07-24 | 1 | -1/+4 |
| | |||||
* | PDFTemplateView.cmd_options contains all the options to pass to wkhtmltopdf | Simon Law | 2012-07-24 | 3 | -15/+79 |
| | | | | | | | | | | | | | | | | | | | | 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 Law | 2012-07-24 | 9 | -2/+4 |
| | | | | | | | | | | | | | | | 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 implementations | Simon Law | 2012-07-24 | 4 | -38/+309 |
| | | | | | | | | | 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 Law | 2012-07-23 | 3 | -6/+82 |
| | | | | | | | * 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 Law | 2012-07-20 | 1 | -1/+0 |
| | |||||
* | Use warnings.warn instead of raising PendingDeprecationWarnings. | Simon Law | 2012-07-20 | 2 | -6/+29 |
| | |||||
* | settings.WKHTMLTOPDF_CMD_OPTIONS sets default command-line options. | Simon Law | 2012-07-20 | 2 | -3/+16 |
| | |||||
* | settings.WKHTMLTOPDF_CMD is loaded on-the-fly, not at the module level. | Simon Law | 2012-07-20 | 1 | -3/+2 |
| | | | | This allows overriding this configuration option at run-time. | ||||
* | Reliable command-line argument parsing for wkhtmltopdf(). | Simon Law | 2012-07-20 | 2 | -20/+73 |
| | | | | | | 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. | ||||
* | wkhtmltopdf() uses subprocess.check_output() instead of a custom Popen call. | Simon Law | 2012-07-20 | 2 | -11/+49 |
| | |||||
* | test_wkhtmltopdf tests that wkhtmltopdf generates a PDF. | Simon Law | 2012-07-20 | 1 | -1/+13 |
| | |||||
* | test_template_to_temp_file tries to clean up after itself. | Simon Law | 2012-07-20 | 1 | -5/+13 |
| | |||||
* | spelling/formatting | George Hickman | 2012-07-08 | 1 | -2/+2 |
| | |||||
* | Update LICENSE. | Marc Tamlyn | 2012-06-19 | 1 | -165/+23 |
| | |||||
* | Don't forget the READMEv0.3 | George Hickman | 2012-05-22 | 1 | -1/+1 |
| | |||||
* | Merge pull request #6 from incuna/develop | Charlie Denton | 2012-05-21 | 6 | -26/+60 |
|\ | | | | | Fix tmp_files & tidy up response object | ||||
| * | Bump version to 0.3 | George Hickman | 2012-05-21 | 2 | -17/+12 |
| | | | | | | | | | | | | | | * Tidy up the setup.py. * Remove the old `fread` method. * Make `__version__` a string. * Move `__author__` into __init__.py | ||||
| * | Update changelog for last few releases | George Hickman | 2012-05-21 | 1 | -0/+23 |
| | | |||||
| * | Add a not about the Python 2.6 dependency | George Hickman | 2012-05-21 | 1 | -0/+2 |
| | | |||||
| * | Pass around args and kwargs in PDFResponse | George Hickman | 2012-05-21 | 1 | -5/+6 |
| | | | | | | | | | | In case you want to pass more things up to HttpResponse. Can't pass filename down though. | ||||
| * | Only set 'Content-Disposition' header if filename is set | George Hickman | 2012-05-21 | 1 | -2/+4 |
| | | | | | | | | | | | | | | Setting 'Content-Disposition' explicitly sets the PDF as an attachment causing browsers to download the PDF. However newer browsers, like Chrome, will display the PDF without this header. So assume the dev wants this to be force download if they set the filename. | ||||
| * | Add a Makefile for deployments | George Hickman | 2012-05-21 | 1 | -0/+5 |
| | | |||||
| * | Don't remove tmp files before they're used. | George Hickman | 2012-05-21 | 1 | -6/+12 |
|/ | | | | | Put _tmp_files onto the object and remove them after the output has been created. | ||||
* | Updates to the docs. | Marc Tamlyn | 2012-04-17 | 4 | -42/+80 |
| | |||||
* | Ignore built docs. | Marc Tamlyn | 2012-04-17 | 1 | -0/+1 |
| | |||||
* | Lawyer up! | Marc Tamlyn | 2012-04-17 | 1 | -0/+165 |
| | |||||
* | dammit rst | George Hickman | 2012-03-20 | 1 | -5/+8 |
| | |||||
* | Fix link to known issue in docs | George Hickman | 2012-03-20 | 1 | -0/+1 |
| | |||||
* | Start the docs | George Hickman | 2012-03-20 | 5 | -0/+542 |
| | |||||
* | Make the docs rest | George Hickman | 2012-03-20 | 4 | -34/+43 |
| | |||||
* | Ignore distro parts | George Hickman | 2012-03-20 | 1 | -0/+3 |
| | |||||
* | Bumped version | James Turnbull | 2012-03-09 | 1 | -1/+1 |
| | |||||
* | Fixed remote images in pdf | James Turnbull | 2012-03-09 | 1 | -2/+6 |
| | | | | If there's no context_instance (which seems to be the common case), make a Requestcontext and use that. | ||||
* | Bumped version to 0.2.1v0.2.1 | James Turnbull | 2012-03-09 | 1 | -1/+1 |
| | |||||
* | Be clear with template_to_temp_file's arguments | James Turnbull | 2012-03-09 | 1 | -2/+2 |
| | | | | | | | | | | | It's not obvious what template_to_temp_file is doing with its undefined arguments. The Zen of Python states: Explicit is better than implicit. Readability counts. An alternative solution would be to rename the function to loader_render_to_tempfile or similar, but this fix is more backwards-compatible. | ||||
* | Use get_template_names() to get templates | James Turnbull | 2012-03-09 | 1 | -1/+1 |
| | | | | | Rather than directly going to self.template_name use the get_template_names() function (which returns self.template_name if not overridden). | ||||
* | Bump version to 0.2v0.2 | Charlie Denton | 2012-02-24 | 2 | -3/+3 |
| | |||||
* | Lil' readme fix. | Charlie Denton | 2012-02-24 | 1 | -0/+1 |
| | |||||
* | Merge pull request #1 from incuna/develop | James Turnbull | 2012-02-24 | 4 | -39/+87 |
|\ | | | | | Merge in Develop branch | ||||
| * | Touched up README. | Charlie Denton | 2012-02-24 | 1 | -11/+21 |
| | | |||||
| * | Add changelog and rename readme. | Charlie Denton | 2012-02-24 | 3 | -21/+37 |
| | | |||||
| * | Restore *args to PDFTemplateView. | Charlie Denton | 2012-02-24 | 1 | -4/+2 |
| | | |||||
| * | Fix a couple of daft mistakes. | Charlie Denton | 2012-02-24 | 1 | -6/+7 |
| | | |||||
| * | Add get_filename method. | Charlie Denton | 2012-02-23 | 1 | -1/+4 |
| | | |||||
| * | Made PDFTemplateView a little more extensible, and added orientation. | Charlie Denton | 2012-02-23 | 1 | -12/+18 |
| | | |||||
| * | Return super when called. | Charlie Denton | 2012-02-23 | 1 | -1/+1 |
| | | |||||
| * | Make PDFTemplateView use PDFResponse. | Charlie Denton | 2012-02-23 | 1 | -1/+1 |
| | | |||||
| * | Deprecate baDly cApitalised Views. | Charlie Denton | 2012-02-23 | 1 | -2/+16 |
|/ | |||||
* | Test translation to temp file. | Marc Tamlyn | 2012-01-16 | 3 | -0/+25 |
| |