[Python-modules-commits] [django-jinja] 01/03: New upstream version 2.4.1
Edward Betts
edward at moszumanska.debian.org
Tue Jan 16 16:24:33 UTC 2018
This is an automated email from the git hooks/post-receive script.
edward pushed a commit to branch debian/master
in repository django-jinja.
commit 6f695aa9d69e9cc400c894a38b524eae8c05f0df
Author: Edward Betts <edward at 4angle.com>
Date: Tue Jan 16 10:26:41 2018 +0000
New upstream version 2.4.1
---
PKG-INFO | 3 ++-
django_jinja.egg-info/PKG-INFO | 3 ++-
django_jinja.egg-info/SOURCES.txt | 1 +
django_jinja.egg-info/requires.txt | 4 ++--
django_jinja/backend.py | 15 ++++++++-------
django_jinja/management/commands/makemessages.py | 4 +++-
setup.cfg | 4 +++-
setup.py | 2 +-
8 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/PKG-INFO b/PKG-INFO
index 3902859..106ce62 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,11 +1,12 @@
Metadata-Version: 1.1
Name: django-jinja
-Version: 2.3.1
+Version: 2.4.1
Summary: Jinja2 templating language integrated in Django.
Home-page: https://github.com/niwinz/django-jinja
Author: Andrey Antukh
Author-email: niwi at niwi.be
License: BSD
+Description-Content-Type: UNKNOWN
Description: UNKNOWN
Keywords: django,jinja2
Platform: UNKNOWN
diff --git a/django_jinja.egg-info/PKG-INFO b/django_jinja.egg-info/PKG-INFO
index 3902859..106ce62 100644
--- a/django_jinja.egg-info/PKG-INFO
+++ b/django_jinja.egg-info/PKG-INFO
@@ -1,11 +1,12 @@
Metadata-Version: 1.1
Name: django-jinja
-Version: 2.3.1
+Version: 2.4.1
Summary: Jinja2 templating language integrated in Django.
Home-page: https://github.com/niwinz/django-jinja
Author: Andrey Antukh
Author-email: niwi at niwi.be
License: BSD
+Description-Content-Type: UNKNOWN
Description: UNKNOWN
Keywords: django,jinja2
Platform: UNKNOWN
diff --git a/django_jinja.egg-info/SOURCES.txt b/django_jinja.egg-info/SOURCES.txt
index d055ae2..4e9fe7d 100644
--- a/django_jinja.egg-info/SOURCES.txt
+++ b/django_jinja.egg-info/SOURCES.txt
@@ -1,6 +1,7 @@
LICENSE
MANIFEST.in
README.rst
+setup.cfg
setup.py
django_jinja/__init__.py
django_jinja/apps.py
diff --git a/django_jinja.egg-info/requires.txt b/django_jinja.egg-info/requires.txt
index a508761..e1a78f4 100644
--- a/django_jinja.egg-info/requires.txt
+++ b/django_jinja.egg-info/requires.txt
@@ -1,2 +1,2 @@
-jinja2 >=2.5
-django >=1.8
+jinja2>=2.5
+django>=1.8
diff --git a/django_jinja/backend.py b/django_jinja/backend.py
index e3766ef..7aaaa3f 100644
--- a/django_jinja/backend.py
+++ b/django_jinja/backend.py
@@ -54,13 +54,13 @@ class Origin(object):
class Template(object):
def __init__(self, template, backend):
- self._template = template
+ self.template = template
self.backend = backend
- self.origin = Origin(name=template.filename, template_name=template.name)
- @property
- def name(self):
- return self._template.name
+ self.name = template.name
+ self.origin = Origin(
+ name=template.filename, template_name=template.name
+ )
def render(self, context=None, request=None):
if context is None:
@@ -99,10 +99,11 @@ class Template(object):
context = CompatibilityContext(context)
- signals.template_rendered.send(sender=self, template=self,
+ signals.template_rendered.send(sender=self,
+ template=self,
context=context)
- return mark_safe(self._template.render(context))
+ return mark_safe(self.template.render(context))
class Jinja2(BaseEngine):
diff --git a/django_jinja/management/commands/makemessages.py b/django_jinja/management/commands/makemessages.py
index 965881e..311d7e1 100644
--- a/django_jinja/management/commands/makemessages.py
+++ b/django_jinja/management/commands/makemessages.py
@@ -38,11 +38,13 @@ else:
strip_whitespace_right = re.compile(r"(%s-?\s*(trans|pluralize).*?-%s)\s+" % (BLOCK_TAG_START, BLOCK_TAG_END), re.U)
strip_whitespace_left = re.compile(r"\s+(%s-\s*(endtrans|pluralize).*?-?%s)" % (BLOCK_TAG_START, BLOCK_TAG_END), re.U)
+
def strip_whitespaces(src):
src = strip_whitespace_left.sub(r'\1', src)
src = strip_whitespace_right.sub(r'\1', src)
return src
+
class Command(makemessages.Command):
def handle(self, *args, **options):
@@ -59,7 +61,7 @@ class Command(makemessages.Command):
trans_real.block_re.pattern + '|' + r"""^-?\s*trans(?:\s+(?!'|")(?=.*?=.*?)|\s*-?$)""")
trans_real.plural_re = re.compile(
trans_real.plural_re.pattern + '|' + r"""^-?\s*pluralize(?:\s+.+|-?$)""")
- trans_real.constant_re = re.compile(r"""_\(((?:".*?(?<!\\)")|(?:'.*?(?<!\\)')).*\)""")
+ trans_real.constant_re = re.compile(r""".*?_\(((?:".*?(?<!\\)")|(?:'.*?(?<!\\)')).*?\)""")
def my_templatize(src, origin=None, **kwargs):
new_src = strip_whitespaces(src)
diff --git a/setup.cfg b/setup.cfg
index 861a9f5..adf5ed7 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,7 @@
+[bdist_wheel]
+universal = 1
+
[egg_info]
tag_build =
tag_date = 0
-tag_svn_revision = 0
diff --git a/setup.py b/setup.py
index ffaf74a..cc03c55 100644
--- a/setup.py
+++ b/setup.py
@@ -15,7 +15,7 @@ if sys.version_info < (2, 7):
setup(
name = "django-jinja",
- version = "2.3.1",
+ version = "2.4.1",
description = "Jinja2 templating language integrated in Django.",
long_description = "",
keywords = "django, jinja2",
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/django-jinja.git
More information about the Python-modules-commits
mailing list