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
31d3a355
Kaydet (Commit)
31d3a355
authored
Şub 05, 2015
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #24273 -- Allowed copying RequestContext more than once.
Thanks Collin Anderson for the report.
üst
de62b8ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
context.py
django/template/context.py
+2
-1
test_context.py
tests/template_tests/test_context.py
+6
-1
No files found.
django/template/context.py
Dosyayı görüntüle @
31d3a355
...
@@ -232,5 +232,6 @@ class RequestContext(Context):
...
@@ -232,5 +232,6 @@ class RequestContext(Context):
new_context
=
super
(
RequestContext
,
self
)
.
new
(
values
)
new_context
=
super
(
RequestContext
,
self
)
.
new
(
values
)
# This is for backwards-compatibility: RequestContexts created via
# This is for backwards-compatibility: RequestContexts created via
# Context.new don't include values from context processors.
# Context.new don't include values from context processors.
del
new_context
.
_processors_index
if
hasattr
(
new_context
,
'_processors_index'
):
del
new_context
.
_processors_index
return
new_context
return
new_context
tests/template_tests/test_context.py
Dosyayı görüntüle @
31d3a355
...
@@ -2,7 +2,8 @@
...
@@ -2,7 +2,8 @@
from
unittest
import
TestCase
from
unittest
import
TestCase
from
django.template
import
Context
,
Variable
,
VariableDoesNotExist
from
django.http
import
HttpRequest
from
django.template
import
Context
,
RequestContext
,
Variable
,
VariableDoesNotExist
from
django.template.context
import
RenderContext
from
django.template.context
import
RenderContext
...
@@ -83,3 +84,7 @@ class ContextTests(TestCase):
...
@@ -83,3 +84,7 @@ class ContextTests(TestCase):
# make contexts equals again
# make contexts equals again
b
.
update
({
'a'
:
1
})
b
.
update
({
'a'
:
1
})
self
.
assertEqual
(
a
,
b
)
self
.
assertEqual
(
a
,
b
)
def
test_copy_request_context_twice
(
self
):
# Regression test for #24273 - this doesn't raise an exception
RequestContext
(
HttpRequest
())
.
new
()
.
new
()
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