Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

Commit

Permalink
Merge pull request #4747 from Alig1493/update-jinja
Browse files Browse the repository at this point in the history
[BUG: 1401246] Update jinja and django-jinja
  • Loading branch information
jwhitlock committed Apr 24, 2018
2 parents 78ddba4 + b77980e commit ad11381
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -35,7 +35,8 @@ env:
- TOXENV=flake8
- TOXENV=docs
- TOXENV=locales
INSTALL_DOCKER_COMPOSE=1
CREATE_DB=kuma
INSTALL_PIPELINE=1
- TOXENV=docker
INSTALL_DOCKER_COMPOSE=1
UID=0
Expand Down
2 changes: 1 addition & 1 deletion kuma/core/tests/test_helpers.py
Expand Up @@ -50,7 +50,7 @@ def test_message_with_url_is_link(self):
m = Message(message='Go to http://bit.ly/sample-demo', is_global=True,
is_active=True, url='/')
m.save()
ok_('Go to <a href="http://bit.ly/sample-demo">'
ok_('Go to <a href="http://bit.ly/sample-demo" rel="noopener">'
'http://bit.ly/sample-demo</a>' in
soapbox_messages(get_soapbox_messages('/')))

Expand Down
2 changes: 0 additions & 2 deletions kuma/settings/common.py
Expand Up @@ -619,9 +619,7 @@ def _get_locales():
'extensions': [
'jinja2.ext.do',
'jinja2.ext.loopcontrols',
'jinja2.ext.with_',
'jinja2.ext.i18n',
'jinja2.ext.autoescape',
'puente.ext.i18n',
'django_jinja.builtins.extensions.CsrfExtension',
'django_jinja.builtins.extensions.CacheExtension',
Expand Down
9 changes: 6 additions & 3 deletions requirements/constraints.txt
Expand Up @@ -254,9 +254,12 @@ pyparsing==2.2.0 \
--hash=sha256:fee43f17a9c4087e7ed1605bd6df994c6173c1e977d7ade7b651292fab2bd010


# Jinja2
MarkupSafe==0.23 \
--hash=sha256:a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3
# Used for Jinja2
# Code: https://github.com/pallets/markupsafe
# Changes: https://github.com/pallets/markupsafe/blob/master/CHANGES
# Docs: https://pypi.org/project/MarkupSafe/
MarkupSafe==1.0 \
--hash=sha256:a6be69091dac236ea9c6bc7d012beab42010fa914c459791d627dad4910eb665

# meinheld
greenlet==0.4.12 \
Expand Down
17 changes: 12 additions & 5 deletions requirements/default.txt
Expand Up @@ -98,8 +98,12 @@ django-honeypot==0.5.0 \
--hash=sha256:962304f21055f05c73c41f2506f5a94f5b941e831a203b68e54cb5016bdb8d5e

# Use Jinja2 as the template engine in Django
django-jinja==2.2.1 \
--hash=sha256:04c53ba90cbede97e6543b98291f1eec259e57dfa4e014a5fbf0291afcdae6a9
# Code: https://github.com/niwinz/django-jinja
# Changes: https://github.com/niwinz/django-jinja/blob/master/CHANGES.adoc
# Docs: http://niwinz.github.io/django-jinja/latest/
django-jinja==2.4.1 \
--hash=sha256:8a49d73de616a12075eee14c6d3bbab936261a463457d40348d8b8e2995cfbed \
--hash=sha256:ceaa0eeebc4d91a5800967e50f4f087f0b6457503e3c2af85dc199bed8732a9a

# Use consistent hashes despite adding or removing servers
django-memcached-hashring==0.1.2 \
Expand Down Expand Up @@ -219,9 +223,12 @@ importlib==1.0.3 \
--hash=sha256:65f342a604a2e1028707c5e055266ab2431c26e20fe10780b423320870884dac

# Improved template engine
Jinja2==2.8 \
--hash=sha256:1cc03ef32b64be19e0a5b54578dd790906a34943fe9102cfdae0d4495bd536b4 \
--hash=sha256:bc1ff2ff88dbfacefde4ddde471d1417d3b304e8df103a7a9437d47269201bf4
# Code: https://github.com/pallets/jinja
# Changes: http://jinja.pocoo.org/docs/2.10/changelog/
# Docs: http://jinja.pocoo.org/docs/2.10/
Jinja2==2.10 \
--hash=sha256:74c935a1b8bb9a3947c50a54766a969d4846290e1e788ea44c1392163723c3bd \
--hash=sha256:f84be1bb0040caca4cea721fcbbbbd61f9be9464ca236387158b0feea01914a4

# Serialize pickleable objects to JSON, used in feed processing
jsonpickle==0.9.2 \
Expand Down
11 changes: 7 additions & 4 deletions tox.ini
Expand Up @@ -28,18 +28,21 @@ commands = sphinx-build -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html
[testenv:locales]
whitelist_externals =
cat
docker-compose
make
git
deps = -rrequirements/dev.txt
changedir = locale
setenv =
COMPOSE_FILE = {toxinidir}/docker-compose.yml:{toxinidir}/docker-compose.test.yml
COMPOSE_PROJECT_NAME = localetox
GIT_PAGER = cat
# Test that locales are refreshed w/o error,
# then display diff only if messages changed
commands =
docker-compose run noext make localerefresh
make -C .. localerefresh
git diff -G "^msgid " templates/LC_MESSAGES
passenv =
DATABASE_URL
DJANGO_SETTINGS_MODULE
PIPELINE_*

[testenv:docker]
whitelist_externals = docker-compose
Expand Down

0 comments on commit ad11381

Please sign in to comment.