-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load directly odt_tags for odt engine #41
Conversation
fb025cc
to
330bdaa
Compare
Codecov Report
@@ Coverage Diff @@
## master #41 +/- ##
==========================================
+ Coverage 98.27% 98.29% +0.02%
==========================================
Files 21 21
Lines 696 705 +9
==========================================
+ Hits 684 693 +9
Misses 12 12
Continue to review full report at Codecov.
|
template_engines/backends/docx.py
Outdated
@@ -60,3 +60,7 @@ class DocxEngine(ZipAbstractEngine): | |||
app_dirname = getattr(settings, 'DOCX_ENGINE_APP_DIRNAME', 'templates') | |||
template_class = DocxTemplate | |||
zip_root_file = 'word/document.xml' | |||
|
|||
def __init__(self, params): | |||
params['OPTIONS'] = {'builtins': ['template_engines.templatetags.docx_tags']} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to use a dict setdefaults to prevent hard overriding of project configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or directly use default_builtins in Engine class
template_engines/backends/odt.py
Outdated
@@ -188,3 +188,7 @@ class OdtEngine(ZipAbstractEngine): | |||
app_dirname = getattr(settings, 'ODT_ENGINE_APP_DIRNAME', 'templates') | |||
template_class = OdtTemplate | |||
zip_root_file = 'content.xml' | |||
|
|||
def __init__(self, params): | |||
params['OPTIONS'] = {'builtins': ['template_engines.templatetags.odt_tags']} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to use a dict setdefaults to prevent hard overriding of project configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or directly use default_builtins in Engine class
Code Climate has analyzed commit 931891d and detected 0 issues on this pull request. View more on Code Climate. |
No description provided.