mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-10 00:06:13 +00:00
Fix compatibility with pylint-django (#5538)
It's not possible to use wagtail in a project with pylint and the pylint-django plugin. Pylint-django does not work with foreign keys that are referenced by their string names. See: https://github.com/PyCQA/pylint-django#known-issues If we simply replace the string name with the foreign-key class, linting on wagtail projects is fixed. Also see: https://github.com/PyCQA/pylint/issues/2995 https://github.com/PyCQA/pylint-django/issues/241 Conflicts: CONTRIBUTORS.rst
This commit is contained in:
parent
f12d01f88f
commit
9f600ea08c
2 changed files with 2 additions and 1 deletions
|
|
@ -383,6 +383,7 @@ Contributors
|
|||
* jonny5532
|
||||
* William Blackie
|
||||
* Andrew Miller
|
||||
* Dani Hodovic
|
||||
|
||||
Translators
|
||||
===========
|
||||
|
|
|
|||
|
|
@ -243,7 +243,7 @@ class Page(AbstractPage, index.Indexed, ClusterableModel, metaclass=PageBase):
|
|||
help_text=_("The name of the page as it will appear in URLs e.g http://domain.com/blog/[my-slug]/")
|
||||
)
|
||||
content_type = models.ForeignKey(
|
||||
'contenttypes.ContentType',
|
||||
ContentType,
|
||||
verbose_name=_('content type'),
|
||||
related_name='pages',
|
||||
on_delete=models.SET(get_default_page_content_type)
|
||||
|
|
|
|||
Loading…
Reference in a new issue