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
cc79c7ee
Kaydet (Commit)
cc79c7ee
authored
Agu 31, 2018
tarafından
Jon Dufresne
Kaydeden (comit)
Tim Graham
Agu 31, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #27795 -- Removed force_text() in Model._get_FIELD_display().
üst
3509fb54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
base.py
django/db/models/base.py
+1
-2
No files found.
django/db/models/base.py
Dosyayı görüntüle @
cc79c7ee
...
@@ -28,7 +28,6 @@ from django.db.models.signals import (
...
@@ -28,7 +28,6 @@ from django.db.models.signals import (
class_prepared
,
post_init
,
post_save
,
pre_init
,
pre_save
,
class_prepared
,
post_init
,
post_save
,
pre_init
,
pre_save
,
)
)
from
django.db.models.utils
import
make_model_tuple
from
django.db.models.utils
import
make_model_tuple
from
django.utils.encoding
import
force_text
from
django.utils.text
import
capfirst
,
get_text_list
from
django.utils.text
import
capfirst
,
get_text_list
from
django.utils.translation
import
gettext_lazy
as
_
from
django.utils.translation
import
gettext_lazy
as
_
from
django.utils.version
import
get_version
from
django.utils.version
import
get_version
...
@@ -902,7 +901,7 @@ class Model(metaclass=ModelBase):
...
@@ -902,7 +901,7 @@ class Model(metaclass=ModelBase):
def
_get_FIELD_display
(
self
,
field
):
def
_get_FIELD_display
(
self
,
field
):
value
=
getattr
(
self
,
field
.
attname
)
value
=
getattr
(
self
,
field
.
attname
)
return
force_text
(
dict
(
field
.
flatchoices
)
.
get
(
value
,
value
),
strings_only
=
Tr
ue
)
return
dict
(
field
.
flatchoices
)
.
get
(
value
,
val
ue
)
def
_get_next_or_previous_by_FIELD
(
self
,
field
,
is_next
,
**
kwargs
):
def
_get_next_or_previous_by_FIELD
(
self
,
field
,
is_next
,
**
kwargs
):
if
not
self
.
pk
:
if
not
self
.
pk
:
...
...
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