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
Localsearch non root context #243
Merged
Kwpolska
merged 4 commits into
getnikola:master
from
uli-heller:localsearch-non-root-context
Jul 27, 2017
Merged
Localsearch non root context #243
Kwpolska
merged 4 commits into
getnikola:master
from
uli-heller:localsearch-non-root-context
Jul 27, 2017
Conversation
This file contains 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
... to match the order of conf.py: SEARCH_FORM -> EXTRA_HEAD_DATA -> BODY_END
Kwpolska
requested changes
Jul 26, 2017
v7/localsearch/conf.py.sample
Outdated
@@ -28,17 +32,22 @@ BODY_END = """ | |||
</div> | |||
</div> | |||
<script> | |||
""" | |||
BODY_END += """ |
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.
Do it in one assignment, using string concatenation instead. Also, use json.dumps()
to escape the URL properly (adds quotes).
Am 26.07.2017 um 16:51 schrieb Chris Warrick:
Do it in one assignment, using string concatenation instead.
I've done this.
Also, use |json.dumps()| to escape the URL properly (adds quotes).
I don't get this. Do you mean
* I should use `...+json.dumps(SITE_URL)+...`
* instead of `...+SITE_URL+...` ?
Does this work within conf.py? I'm not sure where to put the `import
json` within
this file.
Thanks + best regards, Uli
…--
Uli Heller
daemons point Gesellschaft für Datenverarbeitung mbH
Zahn-Nopper-Straße 1-3, 70435 Stuttgart
Internet: www.daemons-point.com
Mobil: +49 17273 05646, Tel: +49 711 806708 0, Fax: +49 711 806708 19
mailto:uli.heller@daemons-point.com
|
Put
(note the removed single quotes) |
Done. Thanks a lot for your advice.
|
Kwpolska
approved these changes
Jul 27, 2017
Thanks for fixing this! |
Thanks for pulling!
|
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.
Fixes #242.
Please note: I reordered conf.py.sample to match the ordering within conf.py. This is not required for #242.
Related to #242: It is important to prepend the SITE_URL when loading via javascript. My python skills
are very low. I didn't succeed in adding a
.format()
to the complete BODY_END, maybe since there areextra brackets within the string. So I splitted BODY_END into parts and used
format()
only on the middlepart.