Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/tests/template_tests/test_loaders.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #25120 -- Deprecated egg template loader.Tim Graham2015-07-161-0/+1
|
* Renamed RemovedInDjangoXYWarnings for new roadmap.Tim Graham2015-06-241-7/+7
| | | | | Forwardport of ae1d663b7913f6da233c55409c4973248372d302 from stable/1.8.x plus more.
* Fixed #15053 -- Enabled recursive template loading.Preston Timmons2015-04-221-34/+144
|
* Cleaned up the template debug implementation.Preston Timmons2015-03-201-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This patch does three major things: * Merges the django.template.debug implementation into django.template.base. * Simplifies the debug implementation. The old implementation copied debug information to every token and node. The django_template_source attribute was set in multiple places, some quite hacky, like django.template.defaulttags.ForNode. Debug information is now annotated in two high-level places: * Template.compile_nodelist for errors during parsing * Node.render_annotated for errors during rendering These were chosen because they have access to the template and context as well as to all exceptions that happen during either the parse or render phase. * Moves the contextual line traceback information creation from django.views.debug into django.template.base.Template. The debug views now only deal with the presentation of the debug information.
* Fixed test_notafile_error to pass on Windows.Preston Timmons2015-03-051-1/+1
| | | | | | | This test failed because a different error code is raised on Windows when opening a directory. Since the particular message isn't as important to this test as the fact that the original IOError is reraised, this fixes the test by making the assertion more generic.
* Fixed #24399 -- Made filesystem loaders use more ↵Preston Timmons2015-03-031-6/+33
| | | | specific exceptions.
* Fixed #24409 -- Combined the app_directories and ↵Preston Timmons2015-03-021-3/+17
| | | | | | | filesystem loader implementation. Besides the directories they look in, these two loaders are functionally the same. This removes unnecessary code duplication between the two.
* Cleaned up template loader tests.Preston Timmons2015-02-241-195/+182
|
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-10/+7
|
* Deprecated passing a Context to a generic Template.render.Aymeric Augustin2015-01-121-4/+4
| | | | | | | | | | | A deprecation path is required because the return type of django.template.loader.get_template changed during the multiple template engines refactor. test_csrf_token_in_404 was incorrect: it tested the case when the hardcoded template was rendered, and that template doesn't depend on the CSRF token. This commit makes it test the case when a custom template is rendered.
* Applied ignore_warnings to Django testsClaude Paroz2014-12-301-4/+6
|
* Deprecated TEMPLATE_LOADERS.Aymeric Augustin2014-12-281-50/+64
|
* Supported multiple template engines in render_to_string.Aymeric Augustin2014-12-281-7/+15
| | | | Adjusted its API through a deprecation path according to the DEP.
* Removed private API find_template.Aymeric Augustin2014-12-281-4/+6
| | | | | It wasn't documented and it wasn't used anywhere, except in a few tests that don't test it specifically and can be rewritten with get_template.
* Removed obsolete code for running test_loaders.py.Aymeric Augustin2014-12-131-5/+0
| | | | Running this file as a standalone script doesn't work anyway.
* Converted recently refactored templates tests to ↵Ramiro Morales2014-12-041-6/+6
| | | | | | | | SimpleTestCase. These test methods don't need DB setup/teardown. Refs #23768 and b872134b.
* Moved template loaders management in Engine.Aymeric Augustin2014-11-231-6/+6
| | | | | | | | | | | Passed the engine instance to loaders. This is a prerequisite for looking up configuration on the engine instance instead of global settings. This is backwards incompatible for custom template loaders that override __init__. However the documentation doesn't talk about __init__ and the way to pass arguments to custom template loaders isn't specified. I'm considering it a private API.
* Deprecated dirs argument to override TEMPLATE_DIRS.Aymeric Augustin2014-11-231-1/+2
| | | | Cancels 2f0566fa. Refs #4278.
* Refactored getting the list of template loaders.Aymeric Augustin2014-11-161-1/+2
| | | | | This provides the opportunity to move utility functions specific to the Django Template Language outside of django.template.loader.
* Updated tests for added newlines in ↵Tim Graham2014-08-131-3/+3
| | | | 68686430638215b5405b20bd767c0be392c9221d.
* Fixed many typos in comments and docstrings.Rodolfo Carvalho2014-03-031-1/+1
| | | | Thanks Piotr Kasprzyk for help with the patch.
* Fixed #21741 -- Fixed render_to_string to stop pushing ↵Baptiste Mispelon2014-02-221-0/+12
| | | | | | | empty dictionaries to its Context Thanks to kezabelle for the report and original patch and to numerodix for his improved patch.
* Fixed #21929 - Fixed test regression on Windows.Carl Meyer2014-02-041-1/+1
| | | | Thanks Michael Manfre for the report.
* Fixed #21874 -- Require Django applications to have a ↵Carl Meyer2014-01-271-0/+5
| | | | | | | | | | | | | | | | filesystem path. Wherever possible this filesystem path is derived automatically from the app module's ``__path__`` and ``__file__`` attributes (this avoids any backwards-compatibility problems). AppConfig allows specifying an app's filesystem location explicitly, which overrides all autodetection based on ``__path__`` and ``__file__``. This permits Django to support any type of module as an app (namespace packages, fake modules, modules loaded by other hypothetical non-filesystem module loaders), as long as the app is configured with an explicit filesystem path. Thanks Aymeric for review and discussion.
* Refs #21628 -- removed one usage of the imp module in ↵Alex Gaynor2014-01-191-2/+2
| | | | the tests. It is deprecated in Python 3.4
* Dropped AppCache._empty, _with_app and _without_app.Aymeric Augustin2013-12-231-14/+12
| | | | | It's now easier to achieve the same effect with modify_settings or override_settings.
* Moved apps back in the toplevel django namespace.Aymeric Augustin2013-12-221-1/+1
| | | | Reverted 4a56a93cc458e9ab4dcab95d9f5067d4975dd1a2.
* Stopped iterating on INSTALLED_APPS.Aymeric Augustin2013-12-221-14/+13
| | | | Used the app cache's get_app_configs() method instead.
* Fixed #21460 -- Reenabled proper template precedence in ↵Pablo Martín2013-11-221-0/+30
| | | | | | find_template Refs #20806. Thanks Unai Zalakain for the review.
* Fixing E302 ErrorsJason Myers2013-11-031-6/+7
| | | | Signed-off-by: Jason Myers <jason@jasonamyers.com>
* Removed some direct settings manipulations in tests; ↵Bouke Haarsma2013-10-211-33/+22
| | | | refs #21230.
* Fixed #21288 -- Fixed E126 pep8 warningsAlasdair Nicol2013-10-211-1/+1
|
* Fixed #21287 -- Fixed E123 pep8 warningsAlasdair Nicol2013-10-181-1/+1
|
* Fixed #4278 -- Added a dirs parameter to a few functions ↵Berker Peksag2013-09-181-1/+21
| | | | | | | | | | | to override TEMPLATE_DIRS. * django.template.loader.get_template() * django.template.loader.select_template() * django.shortcuts.render() * django.shortcuts.render_to_response() Thanks amcnabb for the suggestion.
* Added further fixes, tests for #19949/f33db5a09a.Ramiro Morales2013-08-261-2/+8
| | | | Thanks Susan Tan. Refs #19949.
* Fixed 19949 -- Cached template loader now caches ↵SusanTan2013-08-241-0/+11
| | | | | | | TemplateDoesNotExist Thanks @timgraham and @jdunck for the code reviews and Kronuz for bug report and initial patch.
* Fixed handling of template loader tests.Carl Meyer2013-07-261-0/+164
| | | | Previously, the CachedLoaderTests were never run at all.
* Fixed template_tests so discovery doesn't directly find ↵Preston Timmons2013-04-121-156/+0
| | | | tests that require setuptools.
* Modified template_tests for unittest2 discovery.Preston Timmons2013-04-121-0/+156