0

Sys: Windows 11 Prof; Python v3.9.7

I've tried to install Wagtail Colour Picker but I got this error message back.

Do I need to install or remove something? Please Help !

models.UniqueConstraint(fields=['page'], condition=Q(status__in=('in_progress', 'needs_changes')), name='unique_in_progress_workflow') AttributeError: module 'django.db.models' has no attribute 'UniqueConstraint'

MBGeo
  • 1

1 Answers1

0

Django added the Django constraint framework [Django-doc] in . Likely you are using a Django project with a Django version prior to , but some package requires to use this constraint framework.

That being said, the wagtailcolourpicker project [GitHub] is not active anymore: the last commit was in January 2019, and the project has been archived.

Likely however the error is not about that package, but by something else in Wagtail that requires upgrading Django.

Willem Van Onsem
  • 443,496
  • 30
  • 428
  • 555
  • Thanks Willem Vvan Onsem for the information. Probably the error may be somewhere else but since I run pip wagtailcolourpicker, I can't go back to my projet, meaning when I run server i got this: Exception ignored in thread started by: .wrapper at 0x00000200CDC388B0>"C:\Users\...\__init__.py", line 3215, in Meta models.UniqueConstraint(fields=['page'], condition=Q(status__in=('in_progress', 'needs_changes')), name='unique_in_progress_workflow') AttributeError: module 'django.db.models' has no attribute 'UniqueConstraint' – MBGeo Feb 18 '22 at 17:26
  • @MBGeo: the `C:\Users\..._init_.py"` path can point to what package exactly requires this. But if you want this to work, you will need to upgrade the Django version of your project. – Willem Van Onsem Feb 19 '22 at 09:47