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
7be94e03
Kaydet (Commit)
7be94e03
authored
Nis 27, 2017
tarafından
Jon Dufresne
Kaydeden (comit)
Tim Graham
Nis 27, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replaced set |= operator with update() to avoid temporary set.
üst
59f8118c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
base.py
django/db/models/base.py
+1
-1
query.py
django/db/models/sql/query.py
+1
-1
utils.py
django/test/utils.py
+2
-5
No files found.
django/db/models/base.py
Dosyayı görüntüle @
7be94e03
...
...
@@ -204,7 +204,7 @@ class ModelBase(type):
if
base
not
in
parents
or
not
hasattr
(
base
,
'_meta'
):
# Things without _meta aren't functional models, so they're
# uninteresting parents.
inherited_attributes
|=
set
(
base
.
__dict__
.
keys
()
)
inherited_attributes
.
update
(
base
.
__dict__
)
continue
parent_fields
=
base
.
_meta
.
local_fields
+
base
.
_meta
.
local_many_to_many
...
...
django/db/models/sql/query.py
Dosyayı görüntüle @
7be94e03
...
...
@@ -1017,7 +1017,7 @@ class Query:
)
# The used_joins for a tuple of expressions is the union of
# the used_joins for the individual expressions.
used_joins
|=
set
(
k
for
k
,
v
in
self
.
alias_refcount
.
items
()
if
v
>
pre_joins
.
get
(
k
,
0
))
used_joins
.
update
(
k
for
k
,
v
in
self
.
alias_refcount
.
items
()
if
v
>
pre_joins
.
get
(
k
,
0
))
# For Oracle '' is equivalent to null. The check needs to be done
# at this stage because join promotion can't be done at compiler
# stage. Using DEFAULT_DB_ALIAS isn't nice, but it is the best we
...
...
django/test/utils.py
Dosyayı görüntüle @
7be94e03
...
...
@@ -7,6 +7,7 @@ import warnings
from
contextlib
import
contextmanager
from
functools
import
wraps
from
io
import
StringIO
from
itertools
import
chain
from
types
import
SimpleNamespace
from
unittest
import
TestCase
,
skipIf
,
skipUnless
from
xml.dom.minidom
import
Node
,
parseString
...
...
@@ -85,11 +86,7 @@ class ContextList(list):
"""
Flattened keys of subcontexts.
"""
keys
=
set
()
for
subcontext
in
self
:
for
dict
in
subcontext
:
keys
|=
set
(
dict
.
keys
())
return
keys
return
set
(
chain
.
from_iterable
(
d
for
subcontext
in
self
for
d
in
subcontext
))
def
instrumented_test_render
(
self
,
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