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
20ec9daf
Kaydet (Commit)
20ec9daf
authored
Tem 01, 2014
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #22933 -- Deprecated django.template.resolve_variable().
üst
232f2028
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
base.py
django/template/base.py
+5
-0
deprecation.txt
docs/internals/deprecation.txt
+2
-0
1.8.txt
docs/releases/1.8.txt
+7
-0
No files found.
django/template/base.py
Dosyayı görüntüle @
20ec9daf
...
@@ -4,11 +4,13 @@ import re
...
@@ -4,11 +4,13 @@ import re
from
functools
import
partial
from
functools
import
partial
from
importlib
import
import_module
from
importlib
import
import_module
from
inspect
import
getargspec
,
getcallargs
from
inspect
import
getargspec
,
getcallargs
import
warnings
from
django.apps
import
apps
from
django.apps
import
apps
from
django.conf
import
settings
from
django.conf
import
settings
from
django.template.context
import
(
BaseContext
,
Context
,
RequestContext
,
# NOQA: imported for backwards compatibility
from
django.template.context
import
(
BaseContext
,
Context
,
RequestContext
,
# NOQA: imported for backwards compatibility
ContextPopException
)
ContextPopException
)
from
django.utils.deprecation
import
RemovedInDjango20Warning
from
django.utils.itercompat
import
is_iterable
from
django.utils.itercompat
import
is_iterable
from
django.utils.text
import
(
smart_split
,
unescape_string_literal
,
from
django.utils.text
import
(
smart_split
,
unescape_string_literal
,
get_text_list
)
get_text_list
)
...
@@ -658,6 +660,9 @@ def resolve_variable(path, context):
...
@@ -658,6 +660,9 @@ def resolve_variable(path, context):
Deprecated; use the Variable class instead.
Deprecated; use the Variable class instead.
"""
"""
warnings
.
warn
(
"resolve_variable() is deprecated. Use django.template."
"Variable(path).resolve(context) instead"
,
RemovedInDjango20Warning
,
stacklevel
=
2
)
return
Variable
(
path
)
.
resolve
(
context
)
return
Variable
(
path
)
.
resolve
(
context
)
...
...
docs/internals/deprecation.txt
Dosyayı görüntüle @
20ec9daf
...
@@ -42,6 +42,8 @@ about each item can often be found in the release notes of two versions prior.
...
@@ -42,6 +42,8 @@ about each item can often be found in the release notes of two versions prior.
:class:`~django.core.management.BaseCommand` instead, which takes no arguments
:class:`~django.core.management.BaseCommand` instead, which takes no arguments
by default.
by default.
* ``django.template.resolve_variable`` will be removed.
.. _deprecation-removed-in-1.9:
.. _deprecation-removed-in-1.9:
1.9
1.9
...
...
docs/releases/1.8.txt
Dosyayı görüntüle @
20ec9daf
...
@@ -525,3 +525,10 @@ instead, which takes no arguments by default.
...
@@ -525,3 +525,10 @@ instead, which takes no arguments by default.
option ``cache_choices``. This cached querysets between multiple renderings of
option ``cache_choices``. This cached querysets between multiple renderings of
the same ``Form`` object. This option is subject to an accelerated deprecation
the same ``Form`` object. This option is subject to an accelerated deprecation
and will be removed in Django 1.9.
and will be removed in Django 1.9.
``django.template.resolve_variable()``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The function has been informally marked as "Deprecated" for some time. Replace
``resolve_variable(path, context)`` with
``django.template.Variable(path).resolve(context)``.
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