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
e23de9e3
Kaydet (Commit)
e23de9e3
authored
Eyl 19, 2013
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed typo in exception message; refs #19414
Thanks Alexey Boriskin for the report.
üst
9d3e60aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
decorators.py
django/contrib/admin/decorators.py
+1
-1
tests.py
tests/admin_registration/tests.py
+1
-1
No files found.
django/contrib/admin/decorators.py
Dosyayı görüntüle @
e23de9e3
...
@@ -20,7 +20,7 @@ def register(*models, **kwargs):
...
@@ -20,7 +20,7 @@ def register(*models, **kwargs):
raise
ValueError
(
'site must subclass AdminSite'
)
raise
ValueError
(
'site must subclass AdminSite'
)
if
not
issubclass
(
admin_class
,
ModelAdmin
):
if
not
issubclass
(
admin_class
,
ModelAdmin
):
raise
ValueError
(
'Wrapped class must sub
lc
ass ModelAdmin.'
)
raise
ValueError
(
'Wrapped class must sub
cl
ass ModelAdmin.'
)
admin_site
.
register
(
models
,
admin_class
=
admin_class
)
admin_site
.
register
(
models
,
admin_class
=
admin_class
)
...
...
tests/admin_registration/tests.py
Dosyayı görüntüle @
e23de9e3
...
@@ -115,7 +115,7 @@ class TestRegistrationDecorator(TestCase):
...
@@ -115,7 +115,7 @@ class TestRegistrationDecorator(TestCase):
)
)
def
test_wrapped_class_not_a_model_admin
(
self
):
def
test_wrapped_class_not_a_model_admin
(
self
):
self
.
assertRaisesMessage
(
ValueError
,
'Wrapped class must sub
lc
ass ModelAdmin.'
,
self
.
assertRaisesMessage
(
ValueError
,
'Wrapped class must sub
cl
ass ModelAdmin.'
,
register
(
Person
),
CustomSite
)
register
(
Person
),
CustomSite
)
def
test_custom_site_not_an_admin_site
(
self
):
def
test_custom_site_not_an_admin_site
(
self
):
...
...
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