[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [bridgedb] 07/66: Add additional changes to server.py
This is an automated email from the git hooks/post-receive script.
meskio pushed a commit to branch main
in repository bridgedb.
commit 0d9af3fbcefcddf2cf13304a5d0a66e138306324
Author: kez <kez@xxxxxxxxxxxxxx>
AuthorDate: Tue Jan 25 09:29:37 2022 -0800
Add additional changes to server.py
I needed to make the calls to `render` use kwargs to get bridgedb to
work on my machine. Turns out it wasn't just my machine that needed
those changes.
---
bridgedb/distributors/https/server.py | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/bridgedb/distributors/https/server.py b/bridgedb/distributors/https/server.py
index 478d4da..d392d6d 100644
--- a/bridgedb/distributors/https/server.py
+++ b/bridgedb/distributors/https/server.py
@@ -412,16 +412,16 @@ class TranslatedTemplateResource(CustomErrorHandlingResource, CSPResource):
rtl = translations.usingRTLLang(langs)
template = lookup.get_template(self.template)
if langs:
- rendered = template.render(strings,
- getSortedLangList(),
+ rendered = template.render(strings=strings,
+ langs=getSortedLangList(),
rtl=rtl,
lang=langs[0],
langOverride=translations.isLangOverridden(request),
showFaq=self.showFaq,
addAccessKeys=self._add_access_keys)
else:
- rendered = template.render(strings,
- getSortedLangList(),
+ rendered = template.render(strings=strings,
+ langs=getSortedLangList(),
showFaq=self.showFaq,
addAccessKeys=self._add_access_keys)
except Exception as err: # pragma: no cover
@@ -557,16 +557,16 @@ class CaptchaProtectedResource(CustomErrorHandlingResource, CSPResource):
imgstr = b'data:image/jpeg;base64,%s' % base64.b64encode(image)
template = lookup.get_template('captcha.html')
if langs:
- rendered = template.render(strings,
- getSortedLangList(),
+ rendered = template.render(strings=strings,
+ langs=getSortedLangList(),
rtl=rtl,
lang=langs[0],
langOverride=translations.isLangOverridden(request),
imgstr=imgstr.decode("utf-8"),
challenge_field=challenge)
else:
- rendered = template.render(strings,
- getSortedLangList(),
+ rendered = template.render(strings=strings,
+ langs=getSortedLangList(),
imgstr=imgstr.decode("utf-8"),
challenge_field=challenge)
except Exception as err:
@@ -1108,16 +1108,16 @@ class BridgesResource(CustomErrorHandlingResource, CSPResource):
rtl = translations.usingRTLLang(langs)
template = lookup.get_template('bridges.html')
if langs:
- rendered = template.render(strings,
- getSortedLangList(),
+ rendered = template.render(strings=strings,
+ langs=getSortedLangList(),
rtl=rtl,
lang=langs[0],
langOverride=translations.isLangOverridden(request),
answer=bridgeLines,
qrcode=qrcode)
else:
- rendered = template.render(strings,
- getSortedLangList(),
+ rendered = template.render(strings=strings,
+ langs=getSortedLangList(),
answer=bridgeLines,
qrcode=qrcode)
except Exception as err:
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits