Tim Graham
12809e1609
Fixed #23489 -- Added numpy 1.9+ support in template lookups
2014-09-29 19:51:39 -04:00
Tim Graham
1101467ce0
Limited lines to 119 characters in django/
...
refs #23395 .
2014-09-05 09:22:16 -04:00
Anubhav Joshi
0dd05c9e66
Fixed #16383 -- Raised the AttributeError raised in property of an object when used in a template.
...
Thanks maraujop for the report and Hiroki and Tim Graham for review.
2014-07-31 09:13:55 -04:00
Tim Graham
20ec9daf7c
Fixed #22933 -- Deprecated django.template.resolve_variable().
2014-07-01 17:29:41 -04:00
Rodolfo Carvalho
0d91225892
Fixed many typos in comments and docstrings.
...
Thanks Piotr Kasprzyk for help with the patch.
2014-03-03 07:38:09 -05:00
Patrick Robertson
6d18ab01d9
Removed incorrect statement from docstring
...
The docstring of FilterExpression said that it shouldn't be
instantiated from anywhere but the get_filters_from_token
helper function.
However, that helper function was deleted in commit
3ede006fc9
and FilterExpression
is instantiated from inside the compile_filter help function.
2014-02-23 12:33:29 +01:00
Baptiste Mispelon
34263c67b4
Moved the loader tags registration with the other builtins.
2014-01-19 20:11:32 +01:00
Aymeric Augustin
1716b7ce5a
Renamed AppCache to Apps.
...
Also renamed app_cache to apps and "app cache" to "app registry".
Deprecated AppCache.app_cache_ready() in favor of Apps.ready().
2013-12-24 12:25:17 +01:00
Aymeric Augustin
2fef9e5375
Moved apps back in the toplevel django namespace.
...
Reverted 4a56a93cc4
.
2013-12-22 11:39:55 +01:00
Aymeric Augustin
65cd74be8e
Stopped iterating on INSTALLED_APPS.
...
Used the app cache's get_app_configs() method instead.
2013-12-22 11:39:18 +01:00
Loic Bistuer
6685713869
Fixed E127 pep8 warnings.
2013-12-14 11:59:15 -05:00
Tim Graham
98de90d3d8
Fixed spelling of compatibility.
2013-11-09 10:17:17 -05:00
Unai Zalakain
72f63bd24d
Fixed #17529 -- get_template_from_string default arguments break
...
``get_template_from_string`` default arguments were breaking
``assertTemplateUsed``. The solution has been to return only the names of the
templates with a ``name`` attribute distinct of ``None``. The default ``name``
kwarg of ``Template`` has been changed to ``None``, more pythonic than ``'<Unknown
Template>'``.
2013-11-08 17:10:37 +01:00
Alex Gaynor
fe995e6cbd
Fixed the remaining E302 violations int eh django package
2013-11-02 17:37:15 -07:00
Alex Gaynor
7548aa8ffd
More attacking E302 violators
2013-11-02 13:12:09 -07:00
Alex Gaynor
ee48f4af99
Merge pull request #1848 from rayashmanjr/master
...
Correct flake8 violation E261
2013-11-02 12:34:34 -07:00
Ray Ashman Jr
dcfc8fa972
Correct flake8 violation E261
2013-11-02 15:27:47 -04:00
Tim Graham
36ded01527
Fixed #21302 -- Fixed unused imports and import *.
2013-11-02 15:24:56 -04:00
Alasdair Nicol
a800036981
Fixed #21287 -- Fixed E123 pep8 warnings
2013-10-18 10:07:39 +01:00
Alasdair Nicol
dfb4cb9970
Fixed #21285 -- Fixed E121,E122 pep8 warnings
2013-10-17 20:20:11 -04:00
Tim Graham
7fec5a2240
Fixed #7557 -- Added type checking to Variable initialization.
...
Thanks tobias for the suggestion and boblefrag and saz for work on the
patch.
2013-09-19 09:27:19 -04:00
Gregor MacGregor
b2b763448f
Fixed #20841 -- Added messages to NotImplementedErrors
...
Thanks joseph at vertstudios.com for the suggestion.
2013-09-10 11:09:59 -04:00
Curtis Maloney
7c6f2ddcd9
Simplify FilterExpression.args_check
2013-09-09 09:03:50 -04:00
Baptiste Mispelon
28a571348b
Fix #20745 : Don't silence TypeError raised inside templates.
...
Thanks to robin for the report and claudep for the review.
2013-09-08 22:05:35 +02:00
Preston Timmons
8625c7aab3
Fixed #16096 -- Added origin attribute to template instances.
...
Thanks jdunck for the suggestion.
2013-09-06 09:14:52 -04:00
Simon Charette
11cd7388f7
Fixed #20989 -- Removed useless explicit list comprehensions.
2013-08-30 10:57:51 -04:00
Tim Graham
71b5617c24
Fixed #17778 -- Prevented class attributes on context from resolving as template variables.
...
Thanks KyleMac for the report, regebro for the patch, and Aymeric for the test.
2013-08-12 12:41:39 -04:00
Claude Paroz
5c1143910e
Removed most of absolute_import imports
...
Should be unneeded with Python 2.7 and up.
Added some unicode_literals along the way.
2013-07-29 20:28:13 +02:00
Claude Paroz
fdd7a355bf
Deprecated django.utils.importlib
...
This was a shim for pre-Python 2.7 support.
2013-07-29 17:10:22 +02:00
Baptiste Mispelon
ec371ace00
Fixed #20650 -- Fixed {% filter %} incorrectly accepting 'escape' as argument
...
Thanks to grzesiof for the report and to loic84 and Alex Gaynor
for the review.
2013-06-25 20:28:35 +02:00
Aymeric Augustin
9c487b5974
Replaced an antiquated pattern.
...
Thanks Lennart Regebro for pointing it out.
2013-05-17 18:08:58 +02:00
Carl Meyer
3ded2aef71
Remove leading underscore from a function that's all growed up now.
...
This function is now the de facto standard function for rendering values in a
template, and is imported by two other built-in template modules. It shouldn't
have a leading underscore.
2013-02-25 00:33:29 -07:00
Julien Phalip
7d5e35cdb4
Fixed #19829 -- Fixed index lookups for NumPy arrays in templates.
2013-02-14 23:29:15 -08:00
Michael van Tellingen
138de533ff
Fixed #19819 - Improved template filter errors handling.
...
Wrap the Parser.compile_filter method call with a try/except and call the
newly added Parser.compile_filter_error(). Overwrite this method in the
DebugParser to throw the correct error.
Since this error was otherwise catched by the compile_function try/except
block the debugger highlighted the wrong line.
2013-02-14 10:22:59 +01:00
Claude Paroz
ae88e73fa6
Replaced some smart_xxx by force_xxx equivalent
...
smart_str/smart_text should only be used when a potential lazy
string should be preserved in the result of the function call.
2012-08-30 15:46:16 +02:00
Claude Paroz
dce34dc969
[py3] Made __repr__ return str with Python 3
2012-08-12 20:45:39 +02:00
Aymeric Augustin
d4a0b27838
[py3] Refactored __unicode__ to __str__.
...
* Renamed the __unicode__ methods
* Applied the python_2_unicode_compatible decorator
* Removed the StrAndUnicode mix-in that is superseded by
python_2_unicode_compatible
* Kept the __unicode__ methods in classes that specifically
test it under Python 2
2012-08-12 14:44:40 +02:00
Aymeric Augustin
2bb2eecb63
[py3] Removed redundant __str__ methods.
...
These classes already have an identical __unicode__ method, which
will be used after an upcoming refactoring.
2012-08-12 14:44:40 +02:00
Aymeric Augustin
c5ef65bcf3
[py3] Ported django.utils.encoding.
...
* Renamed smart_unicode to smart_text (but kept the old name under
Python 2 for backwards compatibility).
* Renamed smart_str to smart_bytes.
* Re-introduced smart_str as an alias for smart_text under Python 3
and smart_bytes under Python 2 (which is backwards compatible).
Thus smart_str always returns a str objects.
* Used the new smart_str in a few places where both Python 2 and 3
want a str.
2012-08-07 12:00:22 +02:00
Aymeric Augustin
ee191715ea
[py3] Fixed access to dict keys/values/items.
2012-08-07 12:00:22 +02:00
Aymeric Augustin
bdca5ea345
[py3] Replaced unicode/str by six.text_type/bytes.
2012-07-22 09:29:54 +02:00
Aymeric Augustin
3cb2457f46
[py3] Replaced basestring by six.string_types.
2012-07-22 09:29:54 +02:00
Chris Beaven
c57ba67331
Fixed #14502 again -- saner verbatim closing token
...
Previously, the closing token for the verbatim tag was specified as the
first argument of the opening token. As pointed out by Jannis, this is
a rather major departure from the core tag standard.
The new method reflects how you can give a specific closing name to
{% block %} tags.
2012-06-19 10:49:33 +12:00
Claude Paroz
4a103086d5
Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
...
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Aymeric Augustin
4464bbba15
Fixed #14502 -- Added a verbatim template tag.
...
Thanks SmileyChris for the patch.
2012-06-07 09:59:14 +02:00
Claude Paroz
169b1a404c
Replaced foo.next() by next(foo).
...
This new syntax for next() has been introduced in Python 2.6 and is
compatible with Python 3.
2012-05-10 20:15:49 +02:00
Aymeric Augustin
ddfc7c2530
Fixed #4746 -- Allowed spaces around filter separator.
2012-04-30 21:01:06 +02:00
Claude Paroz
3904b74a3f
Fixed #18013 -- Use the new 'as' syntax for exceptions.
...
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29 20:57:15 +02:00
Aymeric Augustin
3e8b40f479
Fixed #17992 -- Added a public API for localtime.
...
Thanks Bradley Ayers for the report.
2012-04-29 15:37:23 +02:00
Adrian Holovaty
d6d4d60109
Made a tiny performance improvement in the template system's Parser.parse() -- don't look up the global variables TOKEN_TEXT, etc.
...
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17400 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-28 01:50:14 +00:00