WL-320: fixed get_template_path to work with absolute path also - #11548
Merged
Conversation
ziafazal
force-pushed
the
ziafazal/fix-get-template-path
branch
from
February 15, 2016 08:34
26d3d96 to
b6e8ae6
Compare
Contributor
Author
|
jenkins run python |
ziafazal
force-pushed
the
ziafazal/fix-get-template-path
branch
from
February 15, 2016 11:57
b6e8ae6 to
070a142
Compare
Contributor
Author
|
jenkins run bokchoy |
| microsite_template_path = microsite_get_value('template_dir', None) | ||
| relative_path = template_path[1:] if template_path.startswith('/') else template_path | ||
|
|
||
| if not microsite_template_path: |
Contributor
There was a problem hiding this comment.
Just for readability, let's move this block up to line 315 and move relative_path closer to search_path
fixed quality violation skipped test in CMS changes after feedback from mattd
ziafazal
force-pushed
the
ziafazal/fix-get-template-path
branch
from
February 16, 2016 06:52
a98e748 to
6cd2657
Compare
Contributor
Author
|
@mattdrayer made changes as you suggested. @felipemontoya would you like to review this PR too? |
Contributor
|
Great, LGTM! 👍 |
Contributor
|
LGTM 👍 |
ziafazal
added a commit
that referenced
this pull request
Feb 16, 2016
WL-320: fixed get_template_path to work with absolute path also
Member
|
I had a look at this, and its alright. In our fork we sometimes do need the leading slash when the path is a microsite template, but we have extended the BaseMicrositeTemplateBackend to support our usecase, so 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It has been discovered while PR #11076 that
get_template_pathinBaseMicrositeTemplateBackendfails in case of absolute path. This PR has fix forget_template_pathinBaseMicrositeTemplateBackendto accept both absolute and relative paths.@saleem-latif please review.
@mattdrayer @strannikk FYI.