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
55ba92a9
Kaydet (Commit)
55ba92a9
authored
Mar 03, 2014
tarafından
Russell Keith-Magee
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Edited contrib.sites check messages for grammar and consistency.
üst
57e08aa2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
managers.py
django/contrib/sites/managers.py
+2
-4
tests.py
tests/sites_framework/tests.py
+2
-3
No files found.
django/contrib/sites/managers.py
Dosyayı görüntüle @
55ba92a9
...
...
@@ -27,8 +27,7 @@ class CurrentSiteManager(models.Manager):
return
[
checks
.
Error
(
"CurrentSiteManager could not find a field named '
%
s'."
%
field_name
,
hint
=
(
'Ensure that you did not misspell the field name. '
'Does the field exist?'
),
hint
=
None
,
obj
=
self
,
id
=
'sites.E001'
,
)
...
...
@@ -37,8 +36,7 @@ class CurrentSiteManager(models.Manager):
if
not
isinstance
(
field
,
(
models
.
ForeignKey
,
models
.
ManyToManyField
)):
return
[
checks
.
Error
(
"CurrentSiteManager requires that '
%
s.
%
s' must be a "
"ForeignKey or ManyToManyField."
%
(
"CurrentSiteManager cannot use '
%
s.
%
s' as it is not a ForeignKey or ManyToManyField."
%
(
self
.
model
.
_meta
.
object_name
,
field_name
),
hint
=
None
,
...
...
tests/sites_framework/tests.py
Dosyayı görüntüle @
55ba92a9
...
...
@@ -51,8 +51,7 @@ class SitesFrameworkTestCase(TestCase):
checks
.
Error
(
(
"CurrentSiteManager could not find a field named "
"'places_this_article_should_appear'."
),
hint
=
(
'Ensure that you did not misspell the field name. '
'Does the field exist?'
),
hint
=
None
,
obj
=
InvalidArticle
.
on_site
,
id
=
'sites.E001'
,
)
...
...
@@ -67,7 +66,7 @@ class SitesFrameworkTestCase(TestCase):
errors
=
ConfusedArticle
.
check
()
expected
=
[
checks
.
Error
(
"CurrentSiteManager
requires that 'ConfusedArticle.site' must be
a ForeignKey or ManyToManyField."
,
"CurrentSiteManager
cannot use 'ConfusedArticle.site' as it is not
a ForeignKey or ManyToManyField."
,
hint
=
None
,
obj
=
ConfusedArticle
.
on_site
,
id
=
'sites.E002'
,
...
...
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