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
92eced62
Kaydet (Commit)
92eced62
authored
Kas 08, 2015
tarafından
Dmitry Dygalo
Kaydeden (comit)
Tim Graham
Kas 17, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Simplified lists creation in three places.
üst
02d974ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
12 deletions
+19
-12
widgets.py
django/contrib/admin/widgets.py
+9
-6
createcachetable.py
django/core/management/commands/createcachetable.py
+5
-2
compiler.py
django/db/models/sql/compiler.py
+5
-4
No files found.
django/contrib/admin/widgets.py
Dosyayı görüntüle @
92eced62
...
...
@@ -45,12 +45,15 @@ class FilteredSelectMultiple(forms.SelectMultiple):
attrs
[
'class'
]
=
'selectfilter'
if
self
.
is_stacked
:
attrs
[
'class'
]
+=
'stacked'
output
=
[
super
(
FilteredSelectMultiple
,
self
)
.
render
(
name
,
value
,
attrs
,
choices
)]
output
.
append
(
'<script type="text/javascript">addEvent(window, "load", function(e) {'
)
# TODO: "id_" is hard-coded here. This should instead use the correct
# API to determine the ID dynamically.
output
.
append
(
'SelectFilter.init("id_
%
s", "
%
s",
%
s); });</script>
\n
'
%
(
name
,
escapejs
(
self
.
verbose_name
),
int
(
self
.
is_stacked
)))
output
=
[
super
(
FilteredSelectMultiple
,
self
)
.
render
(
name
,
value
,
attrs
,
choices
),
'<script type="text/javascript">addEvent(window, "load", function(e) {'
,
# TODO: "id_" is hard-coded here. This should instead use the
# correct API to determine the ID dynamically.
'SelectFilter.init("id_
%
s", "
%
s",
%
s); });</script>
\n
'
%
(
name
,
escapejs
(
self
.
verbose_name
),
int
(
self
.
is_stacked
),
),
]
return
mark_safe
(
''
.
join
(
output
))
...
...
django/core/management/commands/createcachetable.py
Dosyayı görüntüle @
92eced62
...
...
@@ -61,8 +61,11 @@ class Command(BaseCommand):
index_output
=
[]
qn
=
connection
.
ops
.
quote_name
for
f
in
fields
:
field_output
=
[
qn
(
f
.
name
),
f
.
db_type
(
connection
=
connection
)]
field_output
.
append
(
"
%
sNULL"
%
(
"NOT "
if
not
f
.
null
else
""
))
field_output
=
[
qn
(
f
.
name
),
f
.
db_type
(
connection
=
connection
),
'
%
sNULL'
%
(
'NOT '
if
not
f
.
null
else
''
),
]
if
f
.
primary_key
:
field_output
.
append
(
"PRIMARY KEY"
)
elif
f
.
unique
:
...
...
django/db/models/sql/compiler.py
Dosyayı görüntüle @
92eced62
...
...
@@ -1082,10 +1082,7 @@ class SQLUpdateCompiler(SQLCompiler):
self
.
pre_sql_setup
()
if
not
self
.
query
.
values
:
return
''
,
()
table
=
self
.
query
.
tables
[
0
]
qn
=
self
.
quote_name_unless_alias
result
=
[
'UPDATE
%
s'
%
qn
(
table
)]
result
.
append
(
'SET'
)
values
,
update_params
=
[],
[]
for
field
,
model
,
val
in
self
.
query
.
values
:
if
hasattr
(
val
,
'resolve_expression'
):
...
...
@@ -1124,7 +1121,11 @@ class SQLUpdateCompiler(SQLCompiler):
values
.
append
(
'
%
s = NULL'
%
qn
(
name
))
if
not
values
:
return
''
,
()
result
.
append
(
', '
.
join
(
values
))
table
=
self
.
query
.
tables
[
0
]
result
=
[
'UPDATE
%
s SET'
%
qn
(
table
),
', '
.
join
(
values
),
]
where
,
params
=
self
.
compile
(
self
.
query
.
where
)
if
where
:
result
.
append
(
'WHERE
%
s'
%
where
)
...
...
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