Kaydet (Commit) 55ba92a9 authored tarafından Russell Keith-Magee's avatar Russell Keith-Magee

Edited contrib.sites check messages for grammar and consistency.

üst 57e08aa2
...@@ -27,8 +27,7 @@ class CurrentSiteManager(models.Manager): ...@@ -27,8 +27,7 @@ class CurrentSiteManager(models.Manager):
return [ return [
checks.Error( checks.Error(
"CurrentSiteManager could not find a field named '%s'." % field_name, "CurrentSiteManager could not find a field named '%s'." % field_name,
hint=('Ensure that you did not misspell the field name. ' hint=None,
'Does the field exist?'),
obj=self, obj=self,
id='sites.E001', id='sites.E001',
) )
...@@ -37,8 +36,7 @@ class CurrentSiteManager(models.Manager): ...@@ -37,8 +36,7 @@ class CurrentSiteManager(models.Manager):
if not isinstance(field, (models.ForeignKey, models.ManyToManyField)): if not isinstance(field, (models.ForeignKey, models.ManyToManyField)):
return [ return [
checks.Error( checks.Error(
"CurrentSiteManager requires that '%s.%s' must be a " "CurrentSiteManager cannot use '%s.%s' as it is not a ForeignKey or ManyToManyField." % (
"ForeignKey or ManyToManyField." % (
self.model._meta.object_name, field_name self.model._meta.object_name, field_name
), ),
hint=None, hint=None,
......
...@@ -51,8 +51,7 @@ class SitesFrameworkTestCase(TestCase): ...@@ -51,8 +51,7 @@ class SitesFrameworkTestCase(TestCase):
checks.Error( checks.Error(
("CurrentSiteManager could not find a field named " ("CurrentSiteManager could not find a field named "
"'places_this_article_should_appear'."), "'places_this_article_should_appear'."),
hint=('Ensure that you did not misspell the field name. ' hint=None,
'Does the field exist?'),
obj=InvalidArticle.on_site, obj=InvalidArticle.on_site,
id='sites.E001', id='sites.E001',
) )
...@@ -67,7 +66,7 @@ class SitesFrameworkTestCase(TestCase): ...@@ -67,7 +66,7 @@ class SitesFrameworkTestCase(TestCase):
errors = ConfusedArticle.check() errors = ConfusedArticle.check()
expected = [ expected = [
checks.Error( 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, hint=None,
obj=ConfusedArticle.on_site, obj=ConfusedArticle.on_site,
id='sites.E002', id='sites.E002',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment