113 Commits

Author SHA1 Message Date
Max P
7e72603441 Added test files for the auto escape. 2018-11-05 18:29:33 -08:00
Max P
40bf39cde7 Added method escape_values. Exclusively for Python3. 2018-11-05 18:17:43 -08:00
Eric Lapouyade
c04483e4d5 v0.5.6 - Fix #152 2018-10-18 10:07:28 +02:00
elapouya
4ea5d5fdaa Cast to string, import cgi -> html 2018-10-05 14:24:05 +02:00
elapouya
a3b3fdfa18 Add sub/superscript in RichText 2018-09-19 09:42:48 +02:00
Eric Lapouyade
b84b52e97e v0.5.2 2018-09-13 09:45:34 +02:00
Nick Gashkov
98ad7eebf7 Fix '{% vm %}' tag for table cells with XML attributes
Updated regex to match cell content inside '<w:t>' even if <w:t> has XML
attributes such as 'xml:space="preserve"'. Updated test to have this kind
of '<w:t>'.
2018-09-12 12:14:56 +03:00
Nick Gashkov
d6bfc8be79 Fix test incompatibility with Python 3 versions
Replaced 'print' instruction with call of a 'six' package's
implementation compatible with Python 2 as well as Python 3.
2018-09-11 16:08:19 +03:00
elapouya
aa903ac99f Testing new cell vertical merge 2018-09-03 10:35:20 +02:00
Nick Gashkov
5ae0dbbf29 Fix broken tables caused by vertical merge inside complex nested tables
Updated regex pattern to make '{% vm %}' replace a two-step process:
  - Search for <w:tc>...{% vm %}...</w:tc>;
  - Parse table cell and put jinja tags inside correct places.
2018-08-31 18:57:54 +03:00
elapouya
7f994dc107 Use 'six' in template_error.py test 2018-08-07 10:51:19 +02:00
Eric Lapouyade
cb6971009f
Merge pull request #135 from jhpyle/error-context
Added test script for TemplateError trapping
2018-08-07 10:19:57 +02:00
Jonathan Pyle
0a3627d23a Added test script for TemplateError trapping 2018-08-06 22:04:00 -04:00
elapouya
23fbe8c048 Add Hyperlink in RichText 2018-08-03 15:26:56 +02:00
Eric Lapouyade
5456b1cfad Subdocument can now be based on an existing docx 2018-06-21 15:10:11 +02:00
Eric Lapouyade
95ffebb3fe Add font option in RichText 2018-06-07 16:42:12 +02:00
elapouya
a3c15b226e Fix runtests.py 2018-05-16 14:03:37 +02:00
elapouya
7437268425 Better tabs and spaces management for MS Word 2016 2018-05-16 13:56:50 +02:00
Eric Lapouyade
f2e76d0e61 Add jinja2 tags test file 2018-05-15 18:21:20 +02:00
Eric Lapouyade
aa9889fc26 Manage autoscaping on InlineImage, Richtext and Subdoc 2018-05-08 14:20:43 +02:00
Eric Lapouyade
fc9eb4733f Accept variables starting with 'r' in {{}} when no space after {{ 2018-02-03 10:58:33 +01:00
elapouya
57fbf33ff5 Remove debug traces 2017-10-16 08:19:15 +02:00
Eric Lapouyade
3d96e6e5f1 Add {% vm %} to merge cell vertically within a loop 2017-10-15 16:29:41 +02:00
Eric Lapouyade
41671a0363 Merge pull request #93 from Arthaslixin/master
Add vertical cell merge support in a loop
2017-10-15 11:41:18 +02:00
Arthas
e35f8858f9 del .DS_Store 2017-10-15 11:01:59 +08:00
Arthas
10dba16ce9 recover order.py 2017-10-15 10:57:58 +08:00
Arthas
52df98c914 recover order.py&doc and create vertical_merge.py&doc 2017-10-15 10:52:56 +08:00
elapouya
992b52f223 Fixed Bug #95 on replace_pic() method 2017-10-13 09:47:25 +02:00
Arthas
a7348b2dfb modify testfiles for virtical merge 2017-10-10 00:09:00 +08:00
Eric Lapouyade
b94fad8232 Add replace_pic() method to replace pictures from its filename (Thanks to Riccardo Gusmeroli) 2017-10-05 18:01:36 +02:00
Eric Lapouyade
c0e50b47e0 Improve image attachment for InlineImage ojects 2017-09-10 12:41:15 +02:00
Eric Lapouyade
be149b367d - Add replace_embedded() method (useful for embedding docx)
- Add replace_media() method (useful for header/footer images)
2017-09-09 12:28:22 +02:00
Eric Lapouyade
b7947ca10c Add replace_medias() utility (useful for header/footer images) 2017-09-03 20:36:31 +02:00
Eric Lapouyade
a4fa1b4f26 Fix exception in fix_table() 2017-06-27 16:38:40 +02:00
Eric Lapouyade
dac4425a1f Fix bug when using more than one {{r }} or {%r %} in the same run 2017-06-21 00:17:58 +02:00
Eric Lapouyade
00db8d49c8 Better head/footer jinja2 handling& 2017-06-13 08:55:05 +02:00
hugokernel
6f89e33d4f Update tests 2017-06-09 10:16:44 +02:00
Eric Lapouyade
c35a4ed676 Fix bug where one is using '%' (modulo operator) inside a tag 2017-02-20 09:12:54 +01:00
Eric Lapouyade
84062c0c28 Add Listing class to manage \n and \a (new paragraph) and escape text AND keep current styling 2017-02-14 11:20:46 +01:00
Eric Lapouyade
90e6dc12c3 Add {%tc } tags for dynamic table columns 2017-02-07 09:58:31 +01:00
Eric Lapouyade
35df392f79 Remove version limitation over sphinx package in setup.py 2017-01-31 09:26:14 +01:00
Eric Lapouyade
6e1b8b72cf Add PNG & JPEG in tests/test_files/ 2017-01-16 09:44:24 +01:00
Eric Lapouyade
86b1c49991 Add InlineImage class to add images into generated doc without using subdoc 2017-01-15 11:48:00 +01:00
Eric Lapouyade
4989ff6297 working on inline image... 2017-01-14 19:42:23 +01:00
Eric Lapouyade
e80f5c3fd1 add {% colspan %} tag, doc and test files 2017-01-14 17:39:23 +01:00
majkls23
cdf1eb622c Example script for using colspan
This script uses changing colspan attribute for generation of table with dynamic column count depending on input data.
2017-01-13 13:23:04 +01:00
majkls23
44c129c5c7 Example for changing colspan property
Added example for changing colspan propery. Uses count filter for counting columns and then adjust the colspan value of top cell
2017-01-13 13:20:45 +01:00
Eric Lapouyade
b56d474287 py3 support 2016-11-30 09:04:54 +01:00
Mattia Larentis
548230732e supporting py3... 2016-08-09 16:47:35 +02:00
Eric Lapouyade
4e024bef06 add utf-8 support in header/footer -> docxtpl 0.2.2 2016-07-19 10:23:12 +02:00