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
03e40140
Kaydet (Commit)
03e40140
authored
Mar 03, 2013
tarafından
Ramiro Morales
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge pull request #871 from matiasb/ticket_19945
Fixed #19945 -- Fixed default User model Meta inheritance.
üst
60dd4eab
f39fead1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
models.py
django/contrib/auth/models.py
+1
-1
basic.py
django/contrib/auth/tests/basic.py
+11
-0
No files found.
django/contrib/auth/models.py
Dosyayı görüntüle @
03e40140
...
...
@@ -461,7 +461,7 @@ class User(AbstractUser):
Username, password and email are required. Other fields are optional.
"""
class
Meta
:
class
Meta
(
AbstractUser
.
Meta
)
:
swappable
=
'AUTH_USER_MODEL'
...
...
django/contrib/auth/tests/basic.py
Dosyayı görüntüle @
03e40140
...
...
@@ -12,6 +12,7 @@ from django.core.exceptions import ImproperlyConfigured
from
django.core.management
import
call_command
from
django.test
import
TestCase
from
django.test.utils
import
override_settings
from
django.utils
import
translation
from
django.utils.encoding
import
force_str
from
django.utils.six
import
binary_type
,
PY3
,
StringIO
...
...
@@ -232,3 +233,13 @@ class BasicTestCase(TestCase):
"The current user model must point to an installed model"
with
self
.
assertRaises
(
ImproperlyConfigured
):
get_user_model
()
@skipIfCustomUser
def
test_user_verbose_names_translatable
(
self
):
"Default User model verbose names are translatable (#19945)"
with
translation
.
override
(
'en'
):
self
.
assertEqual
(
User
.
_meta
.
verbose_name
,
'user'
)
self
.
assertEqual
(
User
.
_meta
.
verbose_name_plural
,
'users'
)
with
translation
.
override
(
'es'
):
self
.
assertEqual
(
User
.
_meta
.
verbose_name
,
'usuario'
)
self
.
assertEqual
(
User
.
_meta
.
verbose_name_plural
,
'usuarios'
)
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