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
45808895
Kaydet (Commit)
45808895
authored
Tem 20, 2018
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #23919 -- Removed obsolete u-prefix stripping in inspectdb.
üst
ba83378a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
inspectdb.py
django/core/management/commands/inspectdb.py
+1
-6
No files found.
django/core/management/commands/inspectdb.py
Dosyayı görüntüle @
45808895
...
...
@@ -41,9 +41,6 @@ class Command(BaseCommand):
def
table2model
(
table_name
):
return
re
.
sub
(
r'[^a-zA-Z0-9]'
,
''
,
table_name
.
title
())
def
strip_prefix
(
s
):
return
s
[
1
:]
if
s
.
startswith
(
"u'"
)
else
s
with
connection
.
cursor
()
as
cursor
:
yield
"# This is an auto-generated Django model module."
yield
"# You'll have to do the following manually to clean this up:"
...
...
@@ -157,9 +154,7 @@ class Command(BaseCommand):
if
extra_params
:
if
not
field_desc
.
endswith
(
'('
):
field_desc
+=
', '
field_desc
+=
', '
.
join
(
'
%
s=
%
s'
%
(
k
,
strip_prefix
(
repr
(
v
)))
for
k
,
v
in
extra_params
.
items
())
field_desc
+=
', '
.
join
(
'
%
s=
%
r'
%
(
k
,
v
)
for
k
,
v
in
extra_params
.
items
())
field_desc
+=
')'
if
comment_notes
:
field_desc
+=
' # '
+
' '
.
join
(
comment_notes
)
...
...
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