Skip to content
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

Merged
merged 5 commits into from
Nov 5, 2019
Merged

Conversation

LePetitTim
Copy link
Contributor

No description provided.

@codecov
Copy link

codecov bot commented Nov 4, 2019

Codecov Report

Merging #41 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
...te_engines/tests/test_backends/test_docx_engine.py 100% <ø> (ø) ⬆️
...ate_engines/tests/test_backends/test_odt_engine.py 100% <ø> (ø) ⬆️
template_engines/backends/abstract.py 100% <100%> (ø) ⬆️
template_engines/backends/odt.py 91.17% <100%> (+0.36%) ⬆️
template_engines/backends/docx.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fca0d90...931891d. Read the comment docs.

@@ -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']}
Copy link
Member

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

Copy link
Member

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

@@ -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']}
Copy link
Member

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

Copy link
Member

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

@codeclimate
Copy link

codeclimate bot commented Nov 5, 2019

Code Climate has analyzed commit 931891d and detected 0 issues on this pull request.

View more on Code Climate.

@LePetitTim LePetitTim merged commit 942bbec into master Nov 5, 2019
@LePetitTim LePetitTim deleted the fix_engine_options branch November 5, 2019 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants