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

Fix error when overriding templates folder #562

Merged
merged 2 commits into from May 15, 2020

Conversation

yakky
Copy link
Member

@yakky yakky commented May 15, 2020

Adopting #456

Fix #456
Fix #457

electroniceagle and others added 2 commits May 15, 2020 14:09
If a template_prefix has been set in the blog app_config, any
plugin will cause a TemplateDoesNotExist exception unless the
entire template directory is copied.  You will see:

Exception Type: TemplateDoesNotExist at /about/jobs/
Exception Value: djangocms_blog/jobs/plugins/latest_entries.html

This commit refactors get_rendor_template in BlogPlugin to use the
django loader select_template method to first look for an override
then default to the base version of the plugin.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 96.112% when pulling c1aecba on bugfix/issue-457-template-selection into 62b5968 on develop.

@codecov
Copy link

codecov bot commented May 15, 2020

Codecov Report

Merging #562 into develop will increase coverage by 0.19%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #562      +/-   ##
===========================================
+ Coverage    92.79%   92.98%   +0.19%     
===========================================
  Files           24       24              
  Lines         1041     1041              
  Branches       136      136              
===========================================
+ Hits           966      968       +2     
+ Misses          36       34       -2     
  Partials        39       39              
Impacted Files Coverage Δ
djangocms_blog/feeds.py 85.71% <0.00%> (+1.50%) ⬆️

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 62b5968...c1aecba. Read the comment docs.

@yakky yakky merged commit 68f4577 into develop May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugins fail with TemplateDoesNotExist when using template_prefix.
3 participants