Loading django/contrib/sites/managers.py +2 −4 Original line number Diff line number Diff line Loading @@ -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', ) Loading @@ -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, Loading tests/sites_framework/tests.py +2 −3 Original line number Diff line number Diff line Loading @@ -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', ) Loading @@ -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', Loading Loading
django/contrib/sites/managers.py +2 −4 Original line number Diff line number Diff line Loading @@ -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', ) Loading @@ -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, Loading
tests/sites_framework/tests.py +2 −3 Original line number Diff line number Diff line Loading @@ -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', ) Loading @@ -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', Loading