Skip to content
Myr

Copyright switch to "The Jinja Team".

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 37f58ce · Browse files · 51 files+75 added−67 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

51 files+75 added−67 removed

  • tests:+21 added−21 removed
  • other:+54 added−46 removed

51 files+75 added−67 removed

modified:examples/rwbench/rwbench.py+1 added-1 removed
5 unmodified lines
6 A more real-world benchmark of Jinja2. Like the other benchmark in the7 Jinja2 repository this has no real-world usefulnes (despite the name).8 Just go away and ignore it. NOW!910 :copyright: Copyright 2008 by Armin Ronacher.10 :copyright: (c) 2009 by the Jinja Team.11 :license: BSD.12"""13import sys14from os.path import join, dirname, abspath
85 unmodified lines
modified:ext/django2jinja/django2jinja.py+1 added-1 removed
63 unmodified lines
64 writer = Writer(var_re=var_re)65 66 For details about the writing process have a look at the module code.6768 :copyright: Copyright 2008 by Armin Ronacher.68 :copyright: (c) 2009 by the Jinja Team.69 :license: BSD.70"""71import re72import os
693 unmodified lines
modified:ext/djangojinja2.py+1 added-1 removed
13 unmodified lines
14 `JINJA2_EXTENSIONS` List of Jinja2 extensions to use15 `JINJA2_CACHE_SIZE` The size of the Jinja2 template cache.16 ======================= =============================================1718 :copyright: Copyright 2008 by Armin Ronacher.18 :copyright: (c) 2009 by the Jinja Team.19 :license: BSD.20"""21from itertools import chain22from django.conf import settings
63 unmodified lines
modified:ext/inlinegettext.py+1 added-1 removed
4 unmodified lines
56 An example extension for Jinja2 that supports inline gettext calls.7 Requires the i18n extension to be loaded.89 :copyright: Copyright 2008 by Armin Ronacher.9 :copyright: (c) 2009 by the Jinja Team.10 :license: BSD.11"""12import re13from jinja2.ext import Extension
65 unmodified lines
modified:ext/jinja.el+1 added
1;;; jinja.el --- Jinja mode highlighting2;;3;; Author: Georg Brandl4;; Copyright: (c) 2009 by the Jinja Team5;; Last modified: 2008-05-22 23:04 by gbr6;;7;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8;;
205 unmodified lines
modified:jinja2/__init__.py+1 added-1 removed
21 unmodified lines
22 </ul>23 {% endblock %}242526 :copyright: 2008 by Armin Ronacher, Christoph Hack.26 :copyright: (c) 2009 by the Jinja Team.27 :license: BSD, see LICENSE for more details.28"""29__docformat__ = 'restructuredtext en'30try:
38 unmodified lines
modified:jinja2/_ipysupport.py+1 added-1 removed
4 unmodified lines
56 IronPython support library. This library exports functionality from7 the CLR to Python that is normally available in the standard library.89 :copyright: Copyright 2008 by Armin Ronacher.9 :copyright: (c) 2009 by the Jinja Team.10 :license: BSD.11"""12from System import DateTime13from System.IO import Path, File, FileInfo
27 unmodified lines
modified:jinja2/_speedups.c+1 added-1 removed
6 unmodified lines
7 * debug traceback. If the speedups module is not compiled a ctypes8 * implementation of `tb_set_next` and Python implementations of the other9 * functions are used.10 *11 * :copyright: 2008 by Armin Ronacher, Mickaël Guérin.11 * :copyright: (c) 2009 by the Jinja Team.12 * :license: BSD.13 */1415#include <Python.h>
206 unmodified lines
modified:jinja2/bccache.py+1 added-1 removed
9 unmodified lines
1011 Situations where this is useful are often forking web applications that12 are initialized on the first request.1314 :copyright: Copyright 2008 by Armin Ronacher.14 :copyright: (c) 2009 by the Jinja Team.15 :license: BSD.16"""17from os import path, listdir18import marshal
262 unmodified lines
modified:jinja2/compiler.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~~~~~~~~56 Compiles nodes into python code.78 :copyright: Copyright 2008 by Armin Ronacher.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD.10"""11from cStringIO import StringIO12from itertools import chain
1445 unmodified lines
modified:jinja2/constants.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~~~~~~~~56 Various constants.78 :copyright: 2007 by Armin Ronacher.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD, see LICENSE for more details.10"""1112
278 unmodified lines
modified:jinja2/debug.py+1 added-1 removed
5 unmodified lines
6 Implements the debug interface for Jinja. This module does some pretty7 ugly stuff with the Python traceback system in order to achieve tracebacks8 with correct line numbers, locals and contents.910 :copyright: Copyright 2008 by Armin Ronacher.10 :copyright: (c) 2009 by the Jinja Team.11 :license: BSD.12"""13import sys14from jinja2.utils import CodeType
159 unmodified lines
modified:jinja2/defaults.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~~~~~~~~56 Jinja default filters and tags.78 :copyright: 2007-2008 by Armin Ronacher.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD, see LICENSE for more details.10"""11from jinja2.utils import generate_lorem_ipsum, Cycler, Joiner12
27 unmodified lines
modified:jinja2/environment.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~~~~~~~~~~~56 Provides a class that holds runtime and parsing time options.78 :copyright: 2008 by Armin Ronacher.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD, see LICENSE for more details.10"""11import sys12from jinja2 import nodes
836 unmodified lines
modified:jinja2/exceptions.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~~~~~~~~~~56 Jinja exceptions.78 :copyright: 2008 by Armin Ronacher.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD, see LICENSE for more details.10"""1112
75 unmodified lines
modified:jinja2/ext.py+1 added-1 removed
5 unmodified lines
6 Jinja extensions allow to add custom tags similar to the way django custom7 tags work. By default two example extensions exist: an i18n and a cache8 extension.910 :copyright: Copyright 2008 by Armin Ronacher.10 :copyright: (c) 2009 by the Jinja Team.11 :license: BSD.12"""13from collections import deque14from jinja2 import nodes
442 unmodified lines
modified:jinja2/filters.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~~~~~~~56 Bundled jinja filters.78 :copyright: 2008 by Armin Ronacher, Christoph Hack.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD, see LICENSE for more details.10"""11import re12import math
703 unmodified lines
modified:jinja2/lexer.py+1 added-1 removed
9 unmodified lines
10 On the one hand it filters out invalid operators like the bitshift11 operators we don't allow in templates. On the other hand it separates12 template code and python code in expressions.1314 :copyright: 2007-2008 by Armin Ronacher.14 :copyright: (c) 2009 by the Jinja Team.15 :license: BSD, see LICENSE for more details.16"""17import re18from operator import itemgetter
543 unmodified lines
modified:jinja2/loaders.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~~~~~~~56 Jinja loader classes.78 :copyright: 2008 by Armin Ronacher.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD, see LICENSE for more details.10"""11from os import path12try:
297 unmodified lines
modified:jinja2/nodes.py+1 added-1 removed
7 unmodified lines
8 It also provides some node tree helper functions like `in_lineno` and9 `get_nodes` used by the parser and translator in order to normalize10 python and jinja nodes.1112 :copyright: 2008 by Armin Ronacher.12 :copyright: (c) 2009 by the Jinja Team.13 :license: BSD, see LICENSE for more details.14"""15import operator16from itertools import chain, izip
768 unmodified lines
modified:jinja2/optimizer.py+1 added-1 removed
11 unmodified lines
12 have a different scoping.1314 The solution would be a second syntax tree that has the scoping rules stored.1516 :copyright: Copyright 2008 by Christoph Hack, Armin Ronacher.16 :copyright: (c) 2009 by the Jinja Team.17 :license: BSD.18"""19from jinja2 import nodes20from jinja2.visitor import NodeTransformer
48 unmodified lines
modified:jinja2/parser.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~~~~~~56 Implements the template parser.78 :copyright: 2008 by Armin Ronacher.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD, see LICENSE for more details.10"""11from jinja2 import nodes12from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError
768 unmodified lines
modified:jinja2/runtime.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~~~~~~~56 Runtime helpers.78 :copyright: Copyright 2008 by Armin Ronacher.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD.10"""11import sys12from itertools import chain, imap
473 unmodified lines
modified:jinja2/sandbox.py+1 added-1 removed
7 unmodified lines
8 default behavior is easier to use.910 The behavior can be changed by subclassing the environment.1112 :copyright: Copyright 2008 by Armin Ronacher.12 :copyright: (c) 2009 by the Jinja Team.13 :license: BSD.14"""15import operator16from jinja2.runtime import Undefined
234 unmodified lines
modified:jinja2/tests.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~~~~~56 Jinja test functions. Used with the "is" operator.78 :copyright: 2007 by Armin Ronacher.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD, see LICENSE for more details.10"""11import re12from jinja2.runtime import Undefined
124 unmodified lines
modified:jinja2/utils.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~~~~~56 Utility functions.78 :copyright: 2008 by Armin Ronacher.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD, see LICENSE for more details.10"""11import re12import sys
736 unmodified lines
modified:jinja2/visitor.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~~~~~~~56 This module implements a visitor for the nodes.78 :copyright: Copyright 2008 by Armin Ronacher.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD.10"""11from jinja2.nodes import Node12
75 unmodified lines
modified:tests/conftest.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~56 Configure py.test for support stuff.78 :copyright: 2007 by Armin Ronacher, Alexander Schremmer.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD, see LICENSE for more details.10"""1112import os
137 unmodified lines
modified:tests/test_debug.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~~~~~~~~~~~~~56 Tests the traceback rewriter.78 :copyright: Copyright 2008 by Armin Ronacher.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD.10"""11from jinja2 import Environment12from test_loaders import filesystem_loader
25 unmodified lines
modified:tests/test_ext.py+1 added-1 removed
1 unmodified line
2"""3 unit test for some extensions4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2008 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""9import re10from jinja2 import Environment, nodes
127 unmodified lines
modified:tests/test_filters.py+1 added-1 removed
1 unmodified line
2"""3 unit test for the filters4 ~~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2008 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""9from jinja2 import Markup, Environment10
321 unmodified lines
modified:tests/test_forloop.py+1 added-1 removed
1 unmodified line
2"""3 unit test for loop functions4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2007 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""9from py.test import raises10from jinja2.exceptions import UndefinedError, TemplateSyntaxError
152 unmodified lines
modified:tests/test_i18n.py+1 added-1 removed
1 unmodified line
2"""3 unit test for the i18n functions4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2007 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""9from py.test import raises10from jinja2 import Environment, DictLoader, contextfunction
86 unmodified lines
modified:tests/test_ifcondition.py+1 added-1 removed
1 unmodified line
2"""3 unit test for if conditions4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2007 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""910SIMPLE = '''{% if true %}...{% endif %}'''
36 unmodified lines
modified:tests/test_imports.py+1 added-1 removed
1 unmodified line
2"""3 unit test for the imports and includes4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2007 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""9from py.test import raises10from jinja2 import Environment, DictLoader
72 unmodified lines
modified:tests/test_inheritance.py+1 added-1 removed
1 unmodified line
2"""3 unit test for the inheritance4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2007 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""9from jinja2 import Environment, DictLoader10from jinja2.exceptions import TemplateSyntaxError
158 unmodified lines
modified:tests/test_lexer.py+1 added-1 removed
1 unmodified line
2"""3 unit test for the lexer4 ~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2007 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""910RAW = '{% raw %}foo{% endraw %}|{%raw%}{{ bar }}|{% baz %}{% endraw %}'
59 unmodified lines
modified:tests/test_loaders.py+1 added-1 removed
1 unmodified line
2"""3 unit test for the loaders4 ~~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2007 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""910from py.test import raises
100 unmodified lines
modified:tests/test_lrucache.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~~~~~~~~~~~56 This module tests the LRU Cache78 :copyright: Copyright 2008 by Armin Ronacher.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD.10"""11import thread12import time
27 unmodified lines
modified:tests/test_macros.py+1 added-1 removed
1 unmodified line
2"""3 unit test for the macros4 ~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2007 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""910SIMPLE = '''\
96 unmodified lines
modified:tests/test_old_bugs.py+1 added-1 removed
3 unmodified lines
4 ~~~~~~~~~~~~~~~~~~56 Unittest that test situations caused by various older bugs.78 :copyright: Copyright 2008 by Armin Ronacher.8 :copyright: (c) 2009 by the Jinja Team.9 :license: BSD.10"""11from jinja2 import Environment, DictLoader12
23 unmodified lines
modified:tests/test_parser.py+1 added-1 removed
1 unmodified line
2"""3 unit test for the parser4 ~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2007 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""9from jinja2 import Environment10
65 unmodified lines
modified:tests/test_security.py+1 added-1 removed
1 unmodified line
2"""3 unit test for security features4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2007 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""9from py.test import raises10from jinja2 import Environment
128 unmodified lines
modified:tests/test_streaming.py+1 added-1 removed
1 unmodified line
2"""3 unit test for streaming interface4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2007 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""910
41 unmodified lines
modified:tests/test_syntax.py+1 added-1 removed
1 unmodified line
2"""3 unit test for expression syntax4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2007 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""9from py.test import raises10from jinja2 import Environment, DictLoader
181 unmodified lines
modified:tests/test_tests.py+1 added-1 removed
1 unmodified line
2"""3 unit test for the test functions4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2007 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""9from jinja2 import Environment, Markup10
83 unmodified lines
modified:tests/test_undefined.py+1 added-1 removed
1 unmodified line
2"""3 unit test for the undefined types4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2008 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""9from py.test import raises10from jinja2 import Template
72 unmodified lines
modified:tests/test_various.py+1 added-1 removed
1 unmodified line
2"""3 unit test for various things4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~56 :copyright: 2007 by Armin Ronacher.6 :copyright: (c) 2009 by the Jinja Team.7 :license: BSD, see LICENSE for more details.8"""9import gc10from py.test import raises
100 unmodified lines
modified:AUTHORS+23 added-3 removed
1Jinja is written and maintained by Armin Ronacher <armin.ronacher@active-4.com>.1Jinja is written and maintained by the Jinja Team and various2contributors:33Other contributors (as mentionend in :copyright:s) are:4Lead Developer:56- Armin Ronacher <armin.ronacher@active-4.com>78Developers:910- Christoph Hack11- Georg Brandl7- Lawrence Journal-World.1213Contributors:1415- Bryan McLemore16- Mickaël Guérin <kael@crocobox.org>17- Cameron Knight18- Lawrence Journal-World.19- David Cramer2021Patches and suggestions:2223- Ronny Pfannschmidt24- Axel Böhm25- Alexey Melchakov26- Bryan McLemore27- Clovis Fabricio (nosklo)28- Cameron Knight29- Peter van Dijk (Habbie)30- Stefan Ebner
modified:LICENSE+4 added-2 removed
1Copyright (c) 2006-2008 by the respective authors (see AUTHORS file).2All rights reserved.1Copyright (c) 2006-2008 by the Jinja Team and contributors (see2AUTHORS file).34Some rights reserved.56Redistribution and use in source and binary forms, with or without7modification, are permitted provided that the following conditions are8met:9
23 unmodified lines
deleted:THANKS-15 removed
1Thanks To2=========34All the people listed here helped improving Jinja a lot, provided5patches, helped working out solutions etc. Thanks to all of you!67- Ronny Pfannschmidt8- Axel Böhm9- Alexey Melchakov10- Stefan Ebner11- Bryan McLemore12- David Cramer13- Clovis Fabricio (nosklo)14- Cameron Knight15- Peter van Dijk (Habbie)