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
0c82b1df
Kaydet (Commit)
0c82b1df
authored
Şub 28, 2013
tarafından
Aymeric Augustin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #19929 -- Improved error when MySQL doesn't have TZ definitions.
Thanks tomas_00 for the report.
üst
cf304691
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
compiler.py
django/db/models/sql/compiler.py
+4
-0
index.txt
docs/ref/contrib/admin/index.txt
+7
-0
No files found.
django/db/models/sql/compiler.py
Dosyayı görüntüle @
0c82b1df
...
...
@@ -1057,6 +1057,10 @@ class SQLDateTimeCompiler(SQLCompiler):
# Datetimes are artifically returned in UTC on databases that
# don't support time zone. Restore the zone used in the query.
if
settings
.
USE_TZ
:
if
datetime
is
None
:
raise
ValueError
(
"Database returned an invalid value "
"in QuerySet.dates(). Are time zone "
"definitions installed?"
)
datetime
=
datetime
.
replace
(
tzinfo
=
None
)
datetime
=
timezone
.
make_aware
(
datetime
,
self
.
query
.
tzinfo
)
yield
datetime
...
...
docs/ref/contrib/admin/index.txt
Dosyayı görüntüle @
0c82b1df
...
...
@@ -142,6 +142,13 @@ subclass::
e.g. if all the dates are in one month, it'll show the day-level
drill-down only.
.. note::
``date_hierarchy`` uses :meth:`QuerySet.datetimes()
<django.db.models.query.QuerySet.datetimes>` internally. Please refer
to its documentation for some caveats when time zone support is
enabled (:setting:`USE_TZ = True <USE_TZ>`).
.. attribute:: ModelAdmin.exclude
This attribute, if given, should be a list of field names to exclude from
...
...
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