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
3effe3a9
Kaydet (Commit)
3effe3a9
authored
Şub 13, 2017
tarafından
Vytis Banaitis
Kaydeden (comit)
Tim Graham
Şub 13, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #22669 -- Fixed bulk_create test if Pillow isn't installed.
üst
3f5a35d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
models.py
tests/bulk_create/models.py
+7
-2
No files found.
tests/bulk_create/models.py
Dosyayı görüntüle @
3effe3a9
...
...
@@ -5,6 +5,11 @@ from decimal import Decimal
from
django.db
import
models
from
django.utils
import
timezone
try
:
from
PIL
import
Image
except
ImportError
:
Image
=
None
class
Country
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
255
)
...
...
@@ -76,11 +81,11 @@ class NullableFields(models.Model):
# Fields not required in BulkInsertMapper
char_field
=
models
.
CharField
(
null
=
True
,
max_length
=
4
,
default
=
'char'
)
email_field
=
models
.
EmailField
(
null
=
True
,
default
=
'user@example.com'
)
duration_field
=
models
.
DurationField
(
null
=
True
,
default
=
datetime
.
timedelta
(
1
))
file_field
=
models
.
FileField
(
null
=
True
,
default
=
'file.txt'
)
file_path_field
=
models
.
FilePathField
(
path
=
'/tmp'
,
null
=
True
,
default
=
'file.txt'
)
generic_ip_address_field
=
models
.
GenericIPAddressField
(
null
=
True
,
default
=
'127.0.0.1'
)
image_field
=
models
.
ImageField
(
null
=
True
,
default
=
'image.jpg'
)
if
Image
:
image_field
=
models
.
ImageField
(
null
=
True
,
default
=
'image.jpg'
)
slug_field
=
models
.
SlugField
(
null
=
True
,
default
=
'slug'
)
text_field
=
models
.
TextField
(
null
=
True
,
default
=
'text'
)
url_field
=
models
.
URLField
(
null
=
True
,
default
=
'/'
)
...
...
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