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
c9aedce0
Kaydet (Commit)
c9aedce0
authored
Haz 05, 2014
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replaced an explicit vendor check by a feature flag.
üst
1238f92c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
__init__.py
django/db/backends/__init__.py
+3
-0
base.py
django/db/backends/sqlite3/base.py
+1
-0
tests.py
tests/inspectdb/tests.py
+3
-4
No files found.
django/db/backends/__init__.py
Dosyayı görüntüle @
c9aedce0
...
...
@@ -683,6 +683,9 @@ class BaseDatabaseFeatures(object):
# Can the backend introspect an BooleanField, instead of an IntegerField?
can_introspect_boolean_field
=
True
# Can the backend introspect an DecimalField, instead of an FloatField?
can_introspect_decimal_field
=
True
# Can the backend introspect an IPAddressField, instead of an CharField?
can_introspect_ip_address_field
=
False
...
...
django/db/backends/sqlite3/base.py
Dosyayı görüntüle @
c9aedce0
...
...
@@ -105,6 +105,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
supports_foreign_keys
=
False
supports_check_constraints
=
False
autocommits_when_autocommit_is_off
=
True
can_introspect_decimal_field
=
False
can_introspect_positive_integer_field
=
True
can_introspect_small_integer_field
=
True
supports_transactions
=
True
...
...
tests/inspectdb/tests.py
Dosyayı görüntüle @
c9aedce0
...
...
@@ -100,13 +100,12 @@ class InspectDBTestCase(TestCase):
else
:
assertFieldType
(
'null_bool_field'
,
"models.IntegerField()"
)
if
connection
.
vendor
==
'sqlite'
:
# Guessed arguments on SQLite, see #5014
if
connection
.
features
.
can_introspect_decimal_field
:
assertFieldType
(
'decimal_field'
,
"models.DecimalField(max_digits=6, decimal_places=1)"
)
else
:
# Guessed arguments on SQLite, see #5014
assertFieldType
(
'decimal_field'
,
"models.DecimalField(max_digits=10, decimal_places=5) "
"# max_digits and decimal_places have been guessed, "
"as this database handles decimal fields as float"
)
else
:
assertFieldType
(
'decimal_field'
,
"models.DecimalField(max_digits=6, decimal_places=1)"
)
assertFieldType
(
'float_field'
,
"models.FloatField()"
)
...
...
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