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
8bce6fa6
Kaydet (Commit)
8bce6fa6
authored
Kas 24, 2015
tarafından
Bulgantamir Gankhuyag
Kaydeden (comit)
Tim Graham
Kas 24, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clarified default value for DateField to emulate auto_now_add.
üst
bb50c7da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
fields.txt
docs/ref/models/fields.txt
+6
-2
No files found.
docs/ref/models/fields.txt
Dosyayı görüntüle @
8bce6fa6
...
...
@@ -491,9 +491,13 @@ optional arguments:
for creation of timestamps. Note that the current date is *always* used;
it's not just a default value that you can override. So even if you
set a value for this field when creating the object, it will be ignored.
If you want to be able to modify this field, set
``default=timezone.now``
(from :func:`django.utils.timezone.now`) instead of ``auto_now_add=True``.
If you want to be able to modify this field, set
the following instead of
``auto_now_add=True``:
* For :class:`DateField`: ``default=date.today`` - from
:meth:`datetime.date.today`
* For :class:`DateTimeField`: ``default=timezone.now`` - from
:func:`django.utils.timezone.now`
The default form widget for this field is a
:class:`~django.forms.TextInput`. The admin adds a JavaScript calendar,
...
...
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