awesto / django-shop

A Django based shop system
http://www.django-shop.org
BSD 3-Clause "New" or "Revised" License
3.18k stars 1.04k forks source link

ImportError: No module named 'polymorphic.manager' #732

Closed dismine closed 6 years ago

dismine commented 6 years ago

Hi,

Today i got import error: File "/home/.../shop/models/product.py", line 12, in from polymorphic.manager import PolymorphicManager

I installed django-polymorphic==2.0.2

It seems this issue related to django-polymorphic's issue. Patch from there also works in my case.

dismine commented 6 years ago

Hi,

Can someone fix this issue?

haricot commented 6 years ago

@dismine with django-polymorphic==2.0.2 import manager takes a s from polymorphic.managers import PolymorphicManager

related #723

dismine commented 6 years ago

I know. I mean i just test issue #735 and shop/models/product.py in branch releases/0.12.x still has string from polymorphic.manager import PolymorphicManager. If a maintainer is busy i can create a pull request. I just don't know which branch to use.

haricot commented 6 years ago

django-110 need django-polymorphic==1.3 so in version django-shop 0.12.x you have to use this for the moment. does this pose a problem?

dismine commented 6 years ago

We just could add

try: 
    from polymorphic.managers import PolymorphicManager
except ImportError:
    from polymorphic.manager import PolymorphicManager

and totally forget about this issue.

does this pose a problem?

Yes, thank you. We can close this issue.

haricot commented 6 years ago

it's planned for the future version: https://github.com/awesto/django-shop/pull/723/files#diff-794ded6023e23e60359c61837f571483R16