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
9daf8c43
Kaydet (Commit)
9daf8c43
authored
Tem 27, 2016
tarafından
Adam Chainz
Kaydeden (comit)
Tim Graham
Ock 10, 2017
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #26961 -- Made admin checks run when DEBUG=False.
üst
d57ecf40
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
7 deletions
+0
-7
sites.py
django/contrib/admin/sites.py
+0
-4
tests.py
tests/admin_checks/tests.py
+0
-3
No files found.
django/contrib/admin/sites.py
Dosyayı görüntüle @
9daf8c43
...
...
@@ -2,7 +2,6 @@ from functools import update_wrapper
from
weakref
import
WeakSet
from
django.apps
import
apps
from
django.conf
import
settings
from
django.contrib.admin
import
ModelAdmin
,
actions
from
django.contrib.auth
import
REDIRECT_FIELD_NAME
from
django.core.exceptions
import
ImproperlyConfigured
...
...
@@ -71,9 +70,6 @@ class AdminSite(object):
Run the system checks on all ModelAdmins, except if they aren't
customized at all.
"""
if
not
settings
.
DEBUG
:
return
[]
if
app_configs
is
None
:
app_configs
=
apps
.
get_app_configs
()
app_configs
=
set
(
app_configs
)
# Speed up lookups below
...
...
tests/admin_checks/tests.py
Dosyayı görüntüle @
9daf8c43
...
...
@@ -45,7 +45,6 @@ class MyAdmin(admin.ModelAdmin):
)
class
SystemChecksTestCase
(
SimpleTestCase
):
@override_settings
(
DEBUG
=
True
)
def
test_checks_are_performed
(
self
):
admin
.
site
.
register
(
Song
,
MyAdmin
)
try
:
...
...
@@ -93,7 +92,6 @@ class SystemChecksTestCase(SimpleTestCase):
]
self
.
assertEqual
(
errors
,
expected
)
@override_settings
(
DEBUG
=
True
)
def
test_custom_adminsite
(
self
):
class
CustomAdminSite
(
admin
.
AdminSite
):
pass
...
...
@@ -107,7 +105,6 @@ class SystemChecksTestCase(SimpleTestCase):
finally
:
custom_site
.
unregister
(
Song
)
@override_settings
(
DEBUG
=
True
)
def
test_allows_checks_relying_on_other_modeladmins
(
self
):
class
MyBookAdmin
(
admin
.
ModelAdmin
):
def
check
(
self
,
**
kwargs
):
...
...
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