question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

django-polymorphic now does support Django>3.0

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
sliverccommented, Sep 18, 2020

we are following semver (unlike DRF) so it should be version 4.0.0.

0reactions
sliverccommented, Sep 23, 2020

As of changes made in #828 and #831 this issue is also resolved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Welcome to django-polymorphic's documentation! — django ...
Django-polymorphic builds on top of the standard Django model inheritance. It makes using inherited models easier. When a query is made at the...
Read more >
Django 3.0 support · Issue #443
The support of Django 3.0 has long been needed. Is django-polymorphic going to support it? If yes, then at least the following must...
Read more >
django-polymorphic
Django-polymorphic simplifies using inherited models in Django projects. When a query is made at the base model, the inherited model classes are returned....
Read more >
django-polymorphic Documentation
The current release of django-polymorphic supports Django 2.2 - 4.0 and Python 3.6+. 2.1.1 Making Your Models Polymorphic.
Read more >
django-polymorphic - Python Package Health Analysis
Django-polymorphic simplifies using inherited models in Django projects. When a query is made at the base model, the inherited model classes are returned....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found