mirror of https://github.com/django/django.git
Fixed #25120 -- Deprecated egg template loader.
This commit is contained in:
parent
8e306967de
commit
1fed8dd715
|
@ -208,7 +208,6 @@ TEMPLATE_DIRS = []
|
|||
TEMPLATE_LOADERS = [
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
# 'django.template.loaders.eggs.Loader',
|
||||
]
|
||||
|
||||
# List of processors used by RequestContext to populate the context.
|
||||
|
|
|
@ -15,6 +15,8 @@ try:
|
|||
except ImportError:
|
||||
resource_string = None
|
||||
|
||||
warnings.warn('The egg template loader is deprecated.', RemovedInDjango20Warning)
|
||||
|
||||
|
||||
class EggOrigin(Origin):
|
||||
|
||||
|
|
|
@ -82,6 +82,8 @@ details on these changes.
|
|||
* ``Field._get_val_from_obj()`` will be removed in favor of
|
||||
``Field.value_from_object()``.
|
||||
|
||||
* ``django.template.loaders.eggs.Loader`` will be removed.
|
||||
|
||||
.. _deprecation-removed-in-1.10:
|
||||
|
||||
1.10
|
||||
|
|
|
@ -893,6 +893,10 @@ loaders that come with Django:
|
|||
|
||||
.. class:: eggs.Loader
|
||||
|
||||
.. deprecated:: 1.9
|
||||
|
||||
Distributing applications as eggs is not recommended.
|
||||
|
||||
Just like ``app_directories`` above, but it loads templates from Python
|
||||
eggs rather than from the filesystem.
|
||||
|
||||
|
|
|
@ -1004,6 +1004,9 @@ Miscellaneous
|
|||
* ``django.db.models.Field._get_val_from_obj()`` is deprecated in favor of
|
||||
``Field.value_from_object()``.
|
||||
|
||||
* ``django.template.loaders.eggs.Loader`` is deprecated as distributing
|
||||
applications as eggs is not recommended.
|
||||
|
||||
.. removed-features-1.9:
|
||||
|
||||
Features removed in 1.9
|
||||
|
|
|
@ -153,6 +153,7 @@ class EggLoaderTests(SimpleTestCase):
|
|||
del pkg_resources._provider_factories[MockLoader]
|
||||
|
||||
@classmethod
|
||||
@ignore_warnings(category=RemovedInDjango20Warning)
|
||||
def setUpClass(cls):
|
||||
cls.engine = Engine(loaders=[
|
||||
'django.template.loaders.eggs.Loader',
|
||||
|
|
Loading…
Reference in New Issue