dinoperovic / django-salesman

Headless e-commerce framework for Django and Wagtail.
https://django-salesman.rtfd.io
BSD 3-Clause "New" or "Revised" License
392 stars 48 forks source link

Swappable models incorrectly documented to work with Django<4 #39

Closed thenewguy closed 7 months ago

thenewguy commented 7 months ago

Swappable models release indicates it should work for Django 3.1+.

Should it work with Django 3.x? Was hoping to add this to a project that hasn't completed the update to 4+ yet.

Migrations fail for me on Django<4:

ValueError: The field salesmanbasket.BasketItem.basket was declared with a lazy reference to 'shop.basket', but app 'shop' isn't installed.
The field salesmanorders.OrderItem.order was declared with a lazy reference to 'shop.order', but app 'shop' isn't installed.
The field salesmanorders.OrderNote.order was declared with a lazy reference to 'shop.order', but app 'shop' isn't installed.
The field salesmanorders.OrderPayment.order was declared with a lazy reference to 'shop.order', but app 'shop' isn't installed.

If I install Django 4+ then the migration is successful.

-- edit --

It does appear to work on 3.x once the migration is created on 4.x

dinoperovic commented 7 months ago

Hi @thenewguy, currently only Django 4+ is supported so I would go with that. If you can get it working on 3.x you would have to do it on your own.

I will be looking to support newer versions.