django-jinja-2.4.1/0000755000175000001440000000000013206000750014167 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/0000755000175000001440000000000013206000750016604 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/builtins/0000755000175000001440000000000013206000750020435 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/builtins/__init__.py0000644000175000001440000000076212520361635022565 0ustar niwiusers00000000000000DEFAULT_EXTENSIONS = [ "jinja2.ext.do", "jinja2.ext.loopcontrols", "jinja2.ext.with_", "jinja2.ext.i18n", "jinja2.ext.autoescape", "django_jinja.builtins.extensions.CsrfExtension", "django_jinja.builtins.extensions.CacheExtension", "django_jinja.builtins.extensions.TimezoneExtension", "django_jinja.builtins.extensions.UrlsExtension", "django_jinja.builtins.extensions.StaticFilesExtension", "django_jinja.builtins.extensions.DjangoFiltersExtension", ] django-jinja-2.4.1/django_jinja/builtins/extensions.py0000644000175000001440000002117113027723710023221 0ustar niwiusers00000000000000from __future__ import unicode_literals import traceback import logging import django from django.conf import settings from django.contrib.staticfiles.storage import staticfiles_storage from django.core.cache import cache try: from django.urls import NoReverseMatch from django.urls import reverse except ImportError: from django.core.urlresolvers import NoReverseMatch from django.core.urlresolvers import reverse from django.utils.formats import localize from django.utils.translation import pgettext from django.utils.translation import ugettext from jinja2 import Markup from jinja2 import TemplateSyntaxError from jinja2 import lexer from jinja2 import nodes from jinja2.ext import Extension try: from django.utils.encoding import force_text from django.utils.encoding import force_bytes except ImportError: from django.utils.encoding import force_unicode as force_text from django.utils.encoding import smart_str as force_bytes JINJA2_MUTE_URLRESOLVE_EXCEPTIONS = getattr(settings, "JINJA2_MUTE_URLRESOLVE_EXCEPTIONS", False) logger = logging.getLogger(__name__) # Compatibility with django <= 1.5 if django.VERSION[:2] <= (1, 5): import hashlib from django.utils.http import urlquote def make_template_fragment_key(fragm_name, vary_on): args_map = map(urlquote, vary_on) args_map = map(lambda x: force_bytes(x), args_map) args_string = b':'.join(args_map) args_hash = hashlib.md5(args_string).hexdigest() return 'template.cache.{0}.{1}'.format(fragm_name, args_hash) else: from django.core.cache.utils import make_template_fragment_key class CsrfExtension(Extension): tags = set(['csrf_token']) def __init__(self, environment): self.environment = environment def parse(self, parser): lineno = parser.stream.expect('name:csrf_token').lineno call = self.call_method( '_render', [nodes.Name('csrf_token', 'load', lineno=lineno)], lineno=lineno ) return nodes.Output([nodes.MarkSafe(call)]) def _render(self, csrf_token): if csrf_token: if csrf_token == 'NOTPROVIDED': return Markup("") return Markup("" % (csrf_token)) if settings.DEBUG: import warnings warnings.warn("A {% csrf_token %} was used in a template, but the context" "did not provide the value. This is usually caused by not " "using RequestContext.") return '' class CacheExtension(Extension): """ Exactly like Django's own tag, but supports full Jinja2 expressiveness for all arguments. {% cache gettimeout()*2 "foo"+options.cachename %} ... {% endcache %} General Syntax: {% cache [expire_time] [fragment_name] [var1] [var2] .. %} .. some expensive processing .. {% endcache %} Available by default (does not need to be loaded). Partly based on the ``FragmentCacheExtension`` from the Jinja2 docs. """ tags = set(['cache']) def parse(self, parser): lineno = next(parser.stream).lineno expire_time = parser.parse_expression() fragment_name = parser.parse_expression() vary_on = [] while not parser.stream.current.test('block_end'): vary_on.append(parser.parse_expression()) body = parser.parse_statements(['name:endcache'], drop_needle=True) return nodes.CallBlock( self.call_method('_cache_support', [expire_time, fragment_name, nodes.List(vary_on), nodes.Const(lineno)]), [], [], body).set_lineno(lineno) def _cache_support(self, expire_time, fragm_name, vary_on, lineno, caller): try: expire_time = int(expire_time) except (ValueError, TypeError): raise TemplateSyntaxError('"%s" tag got a non-integer timeout ' 'value: %r' % (list(self.tags)[0], expire_time), lineno) cache_key = make_template_fragment_key(fragm_name, vary_on) value = cache.get(cache_key) if value is None: value = caller() cache.set(cache_key, force_text(value), expire_time) else: value = force_text(value) return value class StaticFilesExtension(Extension): def __init__(self, environment): super(StaticFilesExtension, self).__init__(environment) environment.globals["static"] = self._static def _static(self, path): return staticfiles_storage.url(path) class UrlsExtension(Extension): def __init__(self, environment): super(UrlsExtension, self).__init__(environment) environment.globals["url"] = self._url_reverse def _url_reverse(self, name, *args, **kwargs): try: return reverse(name, args=args, kwargs=kwargs) except NoReverseMatch as exc: logger.error('Error: %s', exc) if not JINJA2_MUTE_URLRESOLVE_EXCEPTIONS: raise return '' return reverse(name, args=args, kwargs=kwargs) from . import filters class TimezoneExtension(Extension): def __init__(self, environment): super(TimezoneExtension, self).__init__(environment) environment.globals["utc"] = filters.utc environment.globals["timezone"] = filters.timezone environment.globals["localtime"] = filters.localtime class DjangoFiltersExtension(Extension): def __init__(self, environment): super(DjangoFiltersExtension, self).__init__(environment) environment.filters["static"] = filters.static environment.filters["reverseurl"] = filters.reverse environment.filters["addslashes"] = filters.addslashes environment.filters["capfirst"] = filters.capfirst environment.filters["escapejs"] = filters.escapejs_filter environment.filters["floatformat"] = filters.floatformat environment.filters["iriencode"] = filters.iriencode environment.filters["linenumbers"] = filters.linenumbers environment.filters["make_list"] = filters.make_list environment.filters["slugify"] = filters.slugify environment.filters["stringformat"] = filters.stringformat environment.filters["truncatechars"] = filters.truncatechars environment.filters["truncatechars_html"] = filters.truncatechars_html environment.filters["truncatewords"] = filters.truncatewords environment.filters["truncatewords_html"] = filters.truncatewords_html environment.filters["urlizetrunc"] = filters.urlizetrunc environment.filters["ljust"] = filters.ljust environment.filters["rjust"] = filters.rjust environment.filters["cut"] = filters.cut environment.filters["linebreaksbr"] = filters.linebreaksbr environment.filters["linebreaks"] = filters.linebreaks_filter environment.filters["striptags"] = filters.striptags environment.filters["add"] = filters.add environment.filters["date"] = filters.date environment.filters["time"] = filters.time environment.filters["timesince"] = filters.timesince_filter environment.filters["timeuntil"] = filters.timeuntil_filter environment.filters["default_if_none"] = filters.default_if_none environment.filters["divisibleby"] = filters.divisibleby environment.filters["yesno"] = filters.yesno environment.filters["pluralize"] = filters.pluralize environment.filters["localtime"] = filters.localtime environment.filters["utc"] = filters.utc environment.filters["timezone"] = filters.timezone class DjangoExtraFiltersExtension(Extension): def __init__(self, environment): super(DjangoExtraFiltersExtension, self).__init__(environment) environment.filters["title"] = filters.title environment.filters["upper"] = filters.upper environment.filters["lower"] = filters.lower environment.filters["urlencode"] = filters.urlencode environment.filters["urlize"] = filters.urlize environment.filters["wordcount"] = filters.wordcount environment.filters["wordwrap"] = filters.wordwrap environment.filters["center"] = filters.center environment.filters["join"] = filters.join environment.filters["length"] = filters.length environment.filters["random"] = filters.random environment.filters["default"] = filters.default environment.filters["filesizeformat"] = filters.filesizeformat environment.filters["pprint"] = filters.pprint django-jinja-2.4.1/django_jinja/builtins/filters.py0000644000175000001440000000701113027723710022467 0ustar niwiusers00000000000000# -*- coding: utf-8 -*- try: from django.utils.encoding import force_text except ImportError: from django.utils.encoding import force_unicode as force_text try: from django.urls import reverse as django_reverse except ImportError: from django.core.urlresolvers import reverse as django_reverse from django.contrib.staticfiles.storage import staticfiles_storage from jinja2 import Markup def reverse(value, *args, **kwargs): """ Shortcut filter for reverse url on templates. Is a alternative to django {% url %} tag, but more simple. Usage example: {{ 'web:timeline'|reverse(userid=2) }} This is a equivalent to django: {% url 'web:timeline' userid=2 %} """ return django_reverse(value, args=args, kwargs=kwargs) def static(path): return staticfiles_storage.url(path) from django.template.defaultfilters import addslashes from django.template.defaultfilters import capfirst from django.utils.html import escapejs as escapejs_filter # from django.utils.html import fix_ampersands as fix_ampersands_filter from django.template.defaultfilters import floatformat from django.template.defaultfilters import iriencode from django.template.defaultfilters import linenumbers from django.template.defaultfilters import make_list from django.template.defaultfilters import stringformat from django.template.defaultfilters import title from django.template.defaultfilters import truncatechars from django.template.defaultfilters import truncatechars_html from django.template.defaultfilters import truncatewords from django.template.defaultfilters import truncatewords_html from django.template.defaultfilters import upper from django.template.defaultfilters import lower from django.template.defaultfilters import urlencode from django.template.defaultfilters import urlize from django.template.defaultfilters import urlizetrunc from django.template.defaultfilters import wordcount from django.template.defaultfilters import wordwrap from django.template.defaultfilters import ljust from django.template.defaultfilters import rjust from django.template.defaultfilters import center from django.template.defaultfilters import cut from django.template.defaultfilters import linebreaks_filter from django.template.defaultfilters import linebreaksbr from django.template.defaultfilters import striptags from django.template.defaultfilters import join from django.template.defaultfilters import length from django.template.defaultfilters import random from django.template.defaultfilters import add from django.template.defaultfilters import date from django.template.defaultfilters import time from django.template.defaultfilters import timesince_filter from django.template.defaultfilters import timeuntil_filter from django.template.defaultfilters import default from django.template.defaultfilters import default_if_none from django.template.defaultfilters import divisibleby from django.template.defaultfilters import yesno from django.template.defaultfilters import filesizeformat from django.template.defaultfilters import pprint from django.template.defaultfilters import pluralize try: from django.utils.text import slugify as djslugify except ImportError: from django.template.defaultfilters import slugify as djslugify def slugify(value): return djslugify(force_text(value)) from functools import partial linebreaksbr = partial(linebreaksbr, autoescape=True) # TZ from django.templatetags.tz import do_timezone as timezone from django.templatetags.tz import localtime from django.templatetags.tz import utc django-jinja-2.4.1/django_jinja/contrib/0000755000175000001440000000000013206000750020244 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/contrib/_easy_thumbnails/0000755000175000001440000000000013206000750023572 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/contrib/_easy_thumbnails/templatetags/0000755000175000001440000000000013206000750026264 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/contrib/_easy_thumbnails/templatetags/__init__.py0000644000175000001440000000003212520361627030403 0ustar niwiusers00000000000000# -*- coding: utf-8 -*- django-jinja-2.4.1/django_jinja/contrib/_easy_thumbnails/templatetags/thumbnails.py0000644000175000001440000000232612520361627031022 0ustar niwiusers00000000000000# -*- coding: utf-8 -*- import logging from easy_thumbnails.conf import settings from easy_thumbnails.templatetags import thumbnail as _thumbnail from django_jinja import library from functools import wraps logger = logging.getLogger(__name__) def debug_silence(error_output=''): def inner(fn): @wraps(fn) def wrapper(*args, **kwargs): try: return fn(*args, **kwargs) except Exception as exc: if settings.THUMBNAIL_DEBUG: raise logger.error('Error: %s', exc) return error_output return wrapper return inner @library.filter @debug_silence(error_output='') def thumbnail_url(source, alias): return _thumbnail.thumbnail_url(source, alias) @library.global_function @debug_silence(error_output=None) def thumbnailer_passive(obj): return _thumbnail.thumbnailer_passive(obj) @library.global_function @debug_silence(error_output=None) def thumbnailer(obj): return _thumbnail.thumbnailer(obj) @library.global_function @debug_silence(error_output='') def thumbnail(source, **kwargs): thumbnail = _thumbnail.get_thumbnailer(source).get_thumbnail(kwargs) return thumbnail.url django-jinja-2.4.1/django_jinja/contrib/_easy_thumbnails/__init__.py0000644000175000001440000000003212520361627025711 0ustar niwiusers00000000000000# -*- coding: utf-8 -*- django-jinja-2.4.1/django_jinja/contrib/_easy_thumbnails/models.py0000644000175000001440000000003212520361627025435 0ustar niwiusers00000000000000# -*- coding: utf-8 -*- django-jinja-2.4.1/django_jinja/contrib/_humanize/0000755000175000001440000000000013206000750022223 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/contrib/_humanize/templatetags/0000755000175000001440000000000013206000750024715 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/contrib/_humanize/templatetags/__init__.py0000644000175000001440000000003212520361627027034 0ustar niwiusers00000000000000# -*- coding: utf-8 -*- django-jinja-2.4.1/django_jinja/contrib/_humanize/templatetags/_humanize.py0000644000175000001440000000116012520361627027257 0ustar niwiusers00000000000000# -*- coding: utf-8 -*- from django.contrib.humanize.templatetags import humanize from django_jinja import library @library.filter def ordinal(source): return humanize.ordinal(source) @library.filter def intcomma(source, use_l10n=True): return humanize.intcomma(source, use_l10n) @library.filter def intword(source): return humanize.intword(source) @library.filter def apnumber(source): return humanize.apnumber(source) @library.filter def naturalday(source, arg=None): return humanize.naturalday(source, arg) @library.filter def naturaltime(source): return humanize.naturaltime(source) django-jinja-2.4.1/django_jinja/contrib/_humanize/__init__.py0000644000175000001440000000003212520361627024342 0ustar niwiusers00000000000000# -*- coding: utf-8 -*- django-jinja-2.4.1/django_jinja/contrib/_humanize/models.py0000644000175000001440000000003212520361627024066 0ustar niwiusers00000000000000# -*- coding: utf-8 -*- django-jinja-2.4.1/django_jinja/contrib/_pipeline/0000755000175000001440000000000013206000750022210 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/contrib/_pipeline/templates/0000755000175000001440000000000013206000750024206 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/contrib/_pipeline/templates/pipeline/0000755000175000001440000000000013206000750026013 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/contrib/_pipeline/templates/pipeline/css.jinja0000644000175000001440000000023512520361627027633 0ustar niwiusers00000000000000 django-jinja-2.4.1/django_jinja/contrib/_pipeline/templates/pipeline/inline_js.jinja0000644000175000001440000000021412520361627031012 0ustar niwiusers00000000000000 django-jinja-2.4.1/django_jinja/contrib/_pipeline/templates/pipeline/js.jinja0000644000175000001440000000020212520361627027451 0ustar niwiusers00000000000000 django-jinja-2.4.1/django_jinja/contrib/_pipeline/templatetags/0000755000175000001440000000000013206000750024702 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/contrib/_pipeline/templatetags/__init__.py0000644000175000001440000000003212520361627027021 0ustar niwiusers00000000000000# -*- coding: utf-8 -*- django-jinja-2.4.1/django_jinja/contrib/_pipeline/templatetags/_pipeline.py0000644000175000001440000000545212520361627027241 0ustar niwiusers00000000000000# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import import jinja2 from django.contrib.staticfiles.storage import staticfiles_storage from django.template.loader import render_to_string from pipeline.conf import settings from pipeline.utils import guess_type from pipeline.packager import Packager, PackageNotFound from pipeline.collector import default_collector from django_jinja import library, utils @library.global_function @jinja2.contextfunction @utils.safe def compressed_css(ctx, name): package = settings.PIPELINE_CSS.get(name, {}) if package: package = {name: package} packager = Packager(css_packages=package, js_packages={}) try: package = packager.package_for('css', name) except PackageNotFound: return "" def _render_css(path): template_name = package.template_name or "pipeline/css.jinja" context = package.extra_context context.update({ 'type': guess_type(path, 'text/css'), 'url': staticfiles_storage.url(path) }) template = ctx.environment.get_template(template_name) return template.render(context) if settings.PIPELINE_ENABLED: return _render_css(package.output_filename) else: default_collector.collect() paths = packager.compile(package.paths) tags = [_render_css(path) for path in paths] return '\n'.join(tags) @library.global_function @jinja2.contextfunction @utils.safe def compressed_js(ctx, name): package = settings.PIPELINE_JS.get(name, {}) if package: package = {name: package} packager = Packager(css_packages={}, js_packages=package) try: package = packager.package_for("js", name) except PackageNotFound: return "" def _render_js(path): template_name = package.template_name or "pipeline/js.jinja" context = package.extra_context context.update({ 'type': guess_type(path, 'text/javascript'), 'url': staticfiles_storage.url(path), }) template = ctx.environment.get_template(template_name) return template.render(context) def _render_inline_js(js): context = package.extra_context context.update({ 'source': js }) template = ctx.environment.get_template("pipeline/inline_js.jinja") return template.render(context) # Render a optimized one if settings.PIPELINE_ENABLED: return _render_js(package.output_filename) else: default_collector.collect() paths = packager.compile(package.paths) templates = packager.pack_templates(package) tags = [_render_js(js) for js in paths] if templates: tags.append(_render_inline_js(templates)) return '\n'.join(tags) django-jinja-2.4.1/django_jinja/contrib/_pipeline/__init__.py0000644000175000001440000000003012520361627024325 0ustar niwiusers00000000000000# -*- coding: utf-8 -*- django-jinja-2.4.1/django_jinja/contrib/_pipeline/models.py0000644000175000001440000000000012520361627024046 0ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/contrib/_subdomains/0000755000175000001440000000000013206000750022547 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/contrib/_subdomains/templatetags/0000755000175000001440000000000013206000750025241 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/contrib/_subdomains/templatetags/__init__.py0000644000175000001440000000000012520361627027353 0ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/contrib/_subdomains/templatetags/subdomainurls.py0000644000175000001440000000044612520361627030521 0ustar niwiusers00000000000000# -*- coding: utf-8 -*- from django_jinja import library from jinja2 import contextfunction from subdomains.templatetags.subdomainurls import url as subdomain_url @library.global_function @contextfunction def url(context, *args, **kwargs): return subdomain_url(context, *args, **kwargs) django-jinja-2.4.1/django_jinja/contrib/_subdomains/__init__.py0000644000175000001440000000000012520361627024661 0ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/contrib/_subdomains/models.py0000644000175000001440000000000012520361627024405 0ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/contrib/__init__.py0000644000175000001440000000000012520361627022356 0ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/management/0000755000175000001440000000000013206000750020720 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/management/commands/0000755000175000001440000000000013206000750022521 5ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/management/commands/__init__.py0000644000175000001440000000000012520361627024633 0ustar niwiusers00000000000000django-jinja-2.4.1/django_jinja/management/commands/makemessages.py0000644000175000001440000000626213205774540025564 0ustar niwiusers00000000000000"""Jinja2's i18n functionality is not exactly the same as Django's. In particular, the tags names and their syntax are different: 1. The Django ``trans`` tag is replaced by a _() global. 2. The Django ``blocktrans`` tag is called ``trans``. (1) isn't an issue, since the whole ``makemessages`` process is based on converting the template tags to ``_()`` calls. However, (2) means that those Jinja2 ``trans`` tags will not be picked up my Django's ``makemessage`` command. There aren't any nice solutions here. While Jinja2's i18n extension does come with extraction capabilities built in, the code behind ``makemessages`` unfortunately isn't extensible, so we can: * Duplicate the command + code behind it. * Offer a separate command for Jinja2 extraction. * Try to get Django to offer hooks into makemessages(). * Monkey-patch. We are currently doing that last thing. It turns out there we are lucky for once: It's simply a matter of extending two regular expressions. Credit for the approach goes to: http://stackoverflow.com/questions/2090717/getting-translation-strings-for-jinja2-templates-integrated-with-django-1-x """ import re from django import VERSION as DJANGO_VERSION from django.core.management.commands import makemessages from django.template.base import BLOCK_TAG_START, BLOCK_TAG_END if DJANGO_VERSION[:2] < (1, 11): from django.utils.translation import trans_real else: from django.utils.translation import template as trans_real 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): old_endblock_re = trans_real.endblock_re old_block_re = trans_real.block_re old_constant_re = trans_real.constant_re old_templatize = trans_real.templatize # Extend the regular expressions that are used to detect # translation blocks with an "OR jinja-syntax" clause. trans_real.endblock_re = re.compile( trans_real.endblock_re.pattern + '|' + r"""^-?\s*endtrans\s*-?$""") trans_real.block_re = re.compile( 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""".*?_\(((?:".*?(?=2.5 django>=1.8 django-jinja-2.4.1/django_jinja.egg-info/top_level.txt0000644000175000001440000000001513206000750023024 0ustar niwiusers00000000000000django_jinja django-jinja-2.4.1/LICENSE0000644000175000001440000000272212520361627015212 0ustar niwiusers00000000000000Copyright (c) 2012-2013 Andrey Antukh Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. django-jinja-2.4.1/MANIFEST.in0000644000175000001440000000013512520361627015737 0ustar niwiusers00000000000000include LICENSE README.rst include django_jinja/contrib/_pipeline/templates/pipeline/*.jinja django-jinja-2.4.1/README.rst0000644000175000001440000000140513032474366015675 0ustar niwiusers00000000000000django-jinja ============ Simple and nonobstructive jinja2 integration with Django. .. image:: https://img.shields.io/travis/niwinz/django-jinja.svg?style=flat :target: https://travis-ci.org/niwinz/django-jinja .. image:: https://img.shields.io/pypi/v/django-jinja.svg?style=flat :target: https://pypi.python.org/pypi/django-jinja **Documentation:** http://niwinz.github.io/django-jinja/latest/ How to install? --------------- You can install it with pip: .. code-block:: shell pip install django-jinja How to run tests as a developer ------------------------------- Install the Tox automation tool (outside a virtualenv), then .. code-block:: shell tox Tox will create virtualenvs for different interpreter versions and run the test suite. django-jinja-2.4.1/setup.cfg0000644000175000001440000000010313206000750016002 0ustar niwiusers00000000000000[bdist_wheel] universal = 1 [egg_info] tag_build = tag_date = 0 django-jinja-2.4.1/setup.py0000644000175000001440000000367313205774624015733 0ustar niwiusers00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup import sys INSTALL_REQUIRES = [ "jinja2 >=2.5", "django >=1.8", ] if sys.version_info < (2, 7): INSTALL_REQUIRES.append("importlib") setup( name = "django-jinja", version = "2.4.1", description = "Jinja2 templating language integrated in Django.", long_description = "", keywords = "django, jinja2", author = "Andrey Antukh", author_email = "niwi@niwi.be", url = "https://github.com/niwinz/django-jinja", license = "BSD", packages = [ "django_jinja", "django_jinja.builtins", "django_jinja.management", "django_jinja.management.commands", "django_jinja.contrib", "django_jinja.contrib._pipeline", "django_jinja.contrib._pipeline.templatetags", "django_jinja.contrib._easy_thumbnails", "django_jinja.contrib._easy_thumbnails.templatetags", "django_jinja.contrib._humanize", "django_jinja.contrib._humanize.templatetags", "django_jinja.contrib._subdomains", "django_jinja.contrib._subdomains.templatetags", "django_jinja.views", "django_jinja.views.generic", ], install_requires = INSTALL_REQUIRES, tests_require = [ "pytz", ], classifiers = [ "Development Status :: 5 - Production/Stable", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", ] ) django-jinja-2.4.1/PKG-INFO0000644000175000001440000000173013206000750015265 0ustar niwiusers00000000000000Metadata-Version: 1.1 Name: django-jinja 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@niwi.be License: BSD Description-Content-Type: UNKNOWN Description: UNKNOWN Keywords: django,jinja2 Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Framework :: Django Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: 3.4 Classifier: Programming Language :: Python :: 3.5 Classifier: Programming Language :: Python :: 3.6 Classifier: Topic :: Internet :: WWW/HTTP