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
aabb5842
Kaydet (Commit)
aabb5842
authored
Haz 30, 2015
tarafından
Marten Kenbeek
Kaydeden (comit)
Tim Graham
Haz 30, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Refs #23621 -- Fixed warning message when reloading models.
üst
00a1d4d0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
registry.py
django/apps/registry.py
+1
-1
tests.py
tests/apps/tests.py
+1
-1
No files found.
django/apps/registry.py
Dosyayı görüntüle @
aabb5842
...
...
@@ -208,7 +208,7 @@ class Apps(object):
warnings
.
warn
(
"Model '
%
s.
%
s' was already registered. "
"Reloading models is not advised as it can lead to inconsistencies, "
"most notably with related models."
%
(
model_name
,
app_label
),
"most notably with related models."
%
(
app_label
,
model_name
),
RuntimeWarning
,
stacklevel
=
2
)
else
:
raise
RuntimeError
(
...
...
tests/apps/tests.py
Dosyayı görüntüle @
aabb5842
...
...
@@ -237,7 +237,7 @@ class AppsTests(SimpleTestCase):
self
.
assertEqual
(
len
(
w
),
1
)
self
.
assertTrue
(
issubclass
(
w
[
-
1
]
.
category
,
RuntimeWarning
))
self
.
assertEqual
(
str
(
w
[
-
1
]
.
message
),
"Model '
southponies.app
s' was already registered. "
"Model '
apps.southponie
s' was already registered. "
"Reloading models is not advised as it can lead to inconsistencies, "
"most notably with related models."
)
...
...
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