Skip to content

django-polymorphic now does support Django>3.0 #803

@n2ygk

Description

@n2ygk

I don't use polymorphic but noticed that the docs build was failing with this traceback:

Traceback (most recent call last):
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/sphinx/config.py", line 319, in eval_config_file
    execfile_(filename, namespace)
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/sphinx/util/pycompat.py", line 88, in execfile_
    exec(code, _globals)
  File "/Users/alan/src/kezy182/docs/conf.py", line 31, in <module>
    django.setup()
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/django/apps/registry.py", line 114, in populate
    app_config.import_models()
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/django/apps/config.py", line 211, in import_models
    self.models_module = import_module(models_module_name)
  File "/Users/ac45/.pyenv/versions/3.6.10/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/polymorphic/models.py", line 17, in <module>
    from .base import PolymorphicModelBase
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/polymorphic/base.py", line 18, in <module>
    from .managers import PolymorphicManager
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/polymorphic/managers.py", line 10, in <module>
    from polymorphic.query import PolymorphicQuerySet
  File "/Users/alan/src/kezy182/.tox/docs/lib/python3.6/site-packages/polymorphic/query.py", line 11, in <module>
    from django.db.models import FieldDoesNotExist
ImportError: cannot import name 'FieldDoesNotExist'

I worked around this by forcing Django>=2.2,<3.0 to get the docs built. PR coming shortly.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy