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
cc5c1b75
Kaydet (Commit)
cc5c1b75
authored
Şub 22, 2017
tarafından
Phil Bazun
Kaydeden (comit)
Tim Graham
Şub 22, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #27870 -- Cleaned up ManagementUtility.autocomplete().
üst
7d20a7d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
__init__.py
django/core/management/__init__.py
+6
-7
No files found.
django/core/management/__init__.py
Dosyayı görüntüle @
cc5c1b75
...
...
@@ -112,7 +112,7 @@ def call_command(command_name, *args, **options):
parser
=
command
.
create_parser
(
''
,
command_name
)
# Use the `dest` option name from the parser option
opt_mapping
=
{
sorted
(
s_opt
.
option_strings
)[
0
]
.
lstrip
(
'-'
)
.
replace
(
'-'
,
'_'
):
s_opt
.
dest
min
(
s_opt
.
option_strings
)
.
lstrip
(
'-'
)
.
replace
(
'-'
,
'_'
):
s_opt
.
dest
for
s_opt
in
parser
.
_actions
if
s_opt
.
option_strings
}
arg_options
=
{
opt_mapping
.
get
(
key
,
key
):
value
for
key
,
value
in
options
.
items
()}
...
...
@@ -254,19 +254,18 @@ class ManagementUtility:
pass
parser
=
subcommand_cls
.
create_parser
(
''
,
cwords
[
0
])
options
.
extend
(
(
sorted
(
s_opt
.
option_strings
)[
0
]
,
s_opt
.
nargs
!=
0
)
(
min
(
s_opt
.
option_strings
)
,
s_opt
.
nargs
!=
0
)
for
s_opt
in
parser
.
_actions
if
s_opt
.
option_strings
)
# filter out previously specified options from available options
prev_opts
=
[
x
.
split
(
'='
)[
0
]
for
x
in
cwords
[
1
:
cword
-
1
]]
options
=
[
opt
for
opt
in
options
if
opt
[
0
]
not
in
prev_opts
]
prev_opts
=
{
x
.
split
(
'='
)[
0
]
for
x
in
cwords
[
1
:
cword
-
1
]}
options
=
(
opt
for
opt
in
options
if
opt
[
0
]
not
in
prev_opts
)
# filter options by current input
options
=
sorted
((
k
,
v
)
for
k
,
v
in
options
if
k
.
startswith
(
curr
))
for
option
in
options
:
opt_label
=
option
[
0
]
for
opt_label
,
require_arg
in
options
:
# append '=' to options which require args
if
option
[
1
]
:
if
require_arg
:
opt_label
+=
'='
print
(
opt_label
)
# Exit code of the bash completion function is never passed back to
...
...
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