Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
2a20ebe6
Kaydet (Commit)
2a20ebe6
authored
Eyl 05, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed deprecated TEMPLATE_* settings per deprecation timeline.
üst
90236966
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
176 deletions
+6
-176
global_settings.py
django/conf/global_settings.py
+0
-29
django_1_8_0.py
django/core/checks/compatibility/django_1_8_0.py
+4
-7
utils.py
django/template/utils.py
+0
-20
signals.py
django/test/signals.py
+0
-5
checks.txt
docs/ref/checks.txt
+2
-3
settings.txt
docs/ref/settings.txt
+0
-112
No files found.
django/conf/global_settings.py
Dosyayı görüntüle @
2a20ebe6
...
@@ -10,7 +10,6 @@ gettext_noop = lambda s: s
...
@@ -10,7 +10,6 @@ gettext_noop = lambda s: s
####################
####################
DEBUG
=
False
DEBUG
=
False
TEMPLATE_DEBUG
=
False
# Whether the framework should propagate raw exceptions rather than catching
# Whether the framework should propagate raw exceptions rather than catching
# them. This is useful under some testing situations and should never be used
# them. This is useful under some testing situations and should never be used
...
@@ -199,34 +198,6 @@ EMAIL_TIMEOUT = None
...
@@ -199,34 +198,6 @@ EMAIL_TIMEOUT = None
# List of strings representing installed apps.
# List of strings representing installed apps.
INSTALLED_APPS
=
[]
INSTALLED_APPS
=
[]
# List of locations of the template source files, in search order.
TEMPLATE_DIRS
=
[]
# List of callables that know how to import templates from various sources.
# See the comments in django/core/template/loader.py for interface
# documentation.
TEMPLATE_LOADERS
=
[
'django.template.loaders.filesystem.Loader'
,
'django.template.loaders.app_directories.Loader'
,
]
# List of processors used by RequestContext to populate the context.
# Each one should be a callable that takes the request object as its
# only parameter and returns a dictionary to add to the context.
TEMPLATE_CONTEXT_PROCESSORS
=
[
'django.contrib.auth.context_processors.auth'
,
'django.template.context_processors.debug'
,
'django.template.context_processors.i18n'
,
'django.template.context_processors.media'
,
'django.template.context_processors.static'
,
'django.template.context_processors.tz'
,
# 'django.template.context_processors.request',
'django.contrib.messages.context_processors.messages'
,
]
# Output to use in template system for invalid (e.g. misspelled) variables.
TEMPLATE_STRING_IF_INVALID
=
''
TEMPLATES
=
[]
TEMPLATES
=
[]
# Default email address to use for various automated correspondence from
# Default email address to use for various automated correspondence from
...
...
django/core/checks/compatibility/django_1_8_0.py
Dosyayı görüntüle @
2a20ebe6
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
from
django.conf
import
global_settings
,
settings
from
django.conf
import
settings
from
..
import
Tags
,
Warning
,
register
from
..
import
Tags
,
Warning
,
register
...
@@ -15,16 +15,13 @@ def check_duplicate_template_settings(app_configs, **kwargs):
...
@@ -15,16 +15,13 @@ def check_duplicate_template_settings(app_configs, **kwargs):
'TEMPLATE_LOADERS'
,
'TEMPLATE_LOADERS'
,
'TEMPLATE_STRING_IF_INVALID'
,
'TEMPLATE_STRING_IF_INVALID'
,
]
]
duplicates
=
[
defined
=
[
value
for
value
in
values
if
getattr
(
settings
,
value
,
None
)]
value
for
value
in
values
if
defined
:
if
getattr
(
settings
,
value
)
!=
getattr
(
global_settings
,
value
)
]
if
duplicates
:
return
[
Warning
(
return
[
Warning
(
"The standalone TEMPLATE_* settings were deprecated in Django "
"The standalone TEMPLATE_* settings were deprecated in Django "
"1.8 and the TEMPLATES dictionary takes precedence. You must "
"1.8 and the TEMPLATES dictionary takes precedence. You must "
"put the values of the following settings into your default "
"put the values of the following settings into your default "
"TEMPLATES dict:
%
s."
%
", "
.
join
(
d
uplicates
),
"TEMPLATES dict:
%
s."
%
", "
.
join
(
d
efined
),
id
=
'1_8.W001'
,
id
=
'1_8.W001'
,
)]
)]
return
[]
return
[]
django/template/utils.py
Dosyayı görüntüle @
2a20ebe6
import
os
import
os
import
warnings
from
collections
import
Counter
,
OrderedDict
from
collections
import
Counter
,
OrderedDict
from
django.apps
import
apps
from
django.apps
import
apps
...
@@ -7,7 +6,6 @@ from django.conf import settings
...
@@ -7,7 +6,6 @@ from django.conf import settings
from
django.core.exceptions
import
ImproperlyConfigured
from
django.core.exceptions
import
ImproperlyConfigured
from
django.utils
import
lru_cache
from
django.utils
import
lru_cache
from
django.utils._os
import
upath
from
django.utils._os
import
upath
from
django.utils.deprecation
import
RemovedInDjango110Warning
from
django.utils.functional
import
cached_property
from
django.utils.functional
import
cached_property
from
django.utils.module_loading
import
import_string
from
django.utils.module_loading
import
import_string
...
@@ -30,24 +28,6 @@ class EngineHandler(object):
...
@@ -30,24 +28,6 @@ class EngineHandler(object):
if
self
.
_templates
is
None
:
if
self
.
_templates
is
None
:
self
.
_templates
=
settings
.
TEMPLATES
self
.
_templates
=
settings
.
TEMPLATES
if
not
self
.
_templates
:
warnings
.
warn
(
"You haven't defined a TEMPLATES setting. You must do so "
"before upgrading to Django 1.10. Otherwise Django will be "
"unable to load templates."
,
RemovedInDjango110Warning
)
self
.
_templates
=
[
{
'BACKEND'
:
'django.template.backends.django.DjangoTemplates'
,
'DIRS'
:
settings
.
TEMPLATE_DIRS
,
'OPTIONS'
:
{
'context_processors'
:
settings
.
TEMPLATE_CONTEXT_PROCESSORS
,
'debug'
:
settings
.
TEMPLATE_DEBUG
,
'loaders'
:
settings
.
TEMPLATE_LOADERS
,
'string_if_invalid'
:
settings
.
TEMPLATE_STRING_IF_INVALID
,
},
},
]
templates
=
OrderedDict
()
templates
=
OrderedDict
()
backend_names
=
[]
backend_names
=
[]
for
tpl
in
self
.
_templates
:
for
tpl
in
self
.
_templates
:
...
...
django/test/signals.py
Dosyayı görüntüle @
2a20ebe6
...
@@ -84,11 +84,6 @@ def clear_routers_cache(**kwargs):
...
@@ -84,11 +84,6 @@ def clear_routers_cache(**kwargs):
def
reset_template_engines
(
**
kwargs
):
def
reset_template_engines
(
**
kwargs
):
if
kwargs
[
'setting'
]
in
{
if
kwargs
[
'setting'
]
in
{
'TEMPLATES'
,
'TEMPLATES'
,
'TEMPLATE_DIRS'
,
'TEMPLATE_CONTEXT_PROCESSORS'
,
'TEMPLATE_DEBUG'
,
'TEMPLATE_LOADERS'
,
'TEMPLATE_STRING_IF_INVALID'
,
'DEBUG'
,
'DEBUG'
,
'FILE_CHARSET'
,
'FILE_CHARSET'
,
'INSTALLED_APPS'
,
'INSTALLED_APPS'
,
...
...
docs/ref/checks.txt
Dosyayı görüntüle @
2a20ebe6
...
@@ -252,9 +252,8 @@ that might occur as a result of a version upgrade.
...
@@ -252,9 +252,8 @@ that might occur as a result of a version upgrade.
* **1_8.W001**: The standalone ``TEMPLATE_*`` settings were deprecated in
* **1_8.W001**: The standalone ``TEMPLATE_*`` settings were deprecated in
Django 1.8 and the :setting:`TEMPLATES` dictionary takes precedence. You must
Django 1.8 and the :setting:`TEMPLATES` dictionary takes precedence. You must
put the values of the following settings into your defaults ``TEMPLATES``
put the values of the following settings into your defaults ``TEMPLATES``
dict: :setting:`TEMPLATE_DIRS`, :setting:`TEMPLATE_CONTEXT_PROCESSORS`,
dict: ``TEMPLATE_DIRS``, ``TEMPLATE_CONTEXT_PROCESSORS``, ``TEMPLATE_DEBUG``,
:setting:`TEMPLATE_DEBUG`, :setting:`TEMPLATE_LOADERS`,
``TEMPLATE_LOADERS``, ``TEMPLATE_STRING_IF_INVALID``.
:setting:`TEMPLATE_STRING_IF_INVALID`.
Admin
Admin
-----
-----
...
...
docs/ref/settings.txt
Dosyayı görüntüle @
2a20ebe6
...
@@ -2314,113 +2314,6 @@ depending on the template backend. See
...
@@ -2314,113 +2314,6 @@ depending on the template backend. See
:class:`~django.template.backends.jinja2.Jinja2` for the options of the
:class:`~django.template.backends.jinja2.Jinja2` for the options of the
built-in backends.
built-in backends.
.. setting:: TEMPLATE_CONTEXT_PROCESSORS
TEMPLATE_CONTEXT_PROCESSORS
---------------------------
Default::
["django.contrib.auth.context_processors.auth",
"django.template.context_processors.debug",
"django.template.context_processors.i18n",
"django.template.context_processors.media",
"django.template.context_processors.static",
"django.template.context_processors.tz",
"django.contrib.messages.context_processors.messages"]
.. deprecated:: 1.8
Set the ``'context_processors'`` option in the :setting:`OPTIONS
<TEMPLATES-OPTIONS>` of a ``DjangoTemplates`` backend instead.
A list of callables that are used to populate the context in ``RequestContext``.
These callables take a request object as their argument and return a dictionary
of items to be merged into the context.
.. versionchanged:: 1.8
Built-in template context processors were moved from
``django.core.context_processors`` to
``django.template.context_processors`` in Django 1.8.
.. setting:: TEMPLATE_DEBUG
TEMPLATE_DEBUG
--------------
Default: ``False``
.. deprecated:: 1.8
Set the ``'debug'`` option in the :setting:`OPTIONS <TEMPLATES-OPTIONS>`
of a ``DjangoTemplates`` backend instead.
A boolean that turns on/off template debug mode. If this is ``True``, the fancy
error page will display a detailed report for any exception raised during
template rendering. This report contains the relevant snippet of the template,
with the appropriate line highlighted.
Note that Django only displays fancy error pages if :setting:`DEBUG` is ``True``, so
you'll want to set that to take advantage of this setting.
See also :setting:`DEBUG`.
.. setting:: TEMPLATE_DIRS
TEMPLATE_DIRS
-------------
Default: ``[]`` (Empty list)
.. deprecated:: 1.8
Set the :setting:`DIRS <TEMPLATES-DIRS>` option of a ``DjangoTemplates``
backend instead.
List of locations of the template source files searched by
:class:`django.template.loaders.filesystem.Loader`, in search order.
Note that these paths should use Unix-style forward slashes, even on Windows.
See :doc:`/ref/templates/language`.
.. setting:: TEMPLATE_LOADERS
TEMPLATE_LOADERS
----------------
Default::
['django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader']
.. deprecated:: 1.8
Set the ``'loaders'`` option in the :setting:`OPTIONS <TEMPLATES-OPTIONS>`
of a ``DjangoTemplates`` backend instead.
A list of template loader classes, specified as strings. Each ``Loader`` class
knows how to import templates from a particular source. Optionally, a tuple can be
used instead of a string. The first item in the tuple should be the ``Loader``’s
module, subsequent items are passed to the ``Loader`` during initialization. See
:doc:`/ref/templates/api`.
.. setting:: TEMPLATE_STRING_IF_INVALID
TEMPLATE_STRING_IF_INVALID
--------------------------
Default: ``''`` (Empty string)
.. deprecated:: 1.8
Set the ``'string_if_invalid'`` option in the :setting:`OPTIONS
<TEMPLATES-OPTIONS>` of a ``DjangoTemplates`` backend instead.
Output, as a string, that the template system should use for invalid (e.g.
misspelled) variables. See :ref:`invalid-template-variables`.
.. setting:: TEST_RUNNER
.. setting:: TEST_RUNNER
TEST_RUNNER
TEST_RUNNER
...
@@ -3406,11 +3299,6 @@ Serialization
...
@@ -3406,11 +3299,6 @@ Serialization
Templates
Templates
---------
---------
* :setting:`TEMPLATES`
* :setting:`TEMPLATES`
* :setting:`TEMPLATE_CONTEXT_PROCESSORS`
* :setting:`TEMPLATE_DEBUG`
* :setting:`TEMPLATE_DIRS`
* :setting:`TEMPLATE_LOADERS`
* :setting:`TEMPLATE_STRING_IF_INVALID`
Testing
Testing
-------
-------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment