Closed FreemanPancake closed 2 weeks ago
@FreemanPancake Can you share the traceback?
@fsbraun please reference this:
Thanks, that's already helpful. Can you let me know the local variables of line 259 in admin.py
(the first highlighted row)?
@FreemanPancake Can you check if the error goes away with django-admin-sortable2==2.2.2
?
Hi @fsbraun ,
After installing the fix you mentioned above, the error disappeared, but we got another error as below. I am also checking how to fix it, and wait for your input.
Hi @fsbraun ,
I have a question about below line, in Workflow
model, the default_order field is name
, which is a charfield. If we specify the output_field
as Integer, I think it might be a mismatch.
@joshyu I think your analysis is correct: If you want a sortable admin, you need an integer-type field for sorting. This means either:
position = models.PositiveIntegerField(...)
field to Workflow
which then needs to be the primary ordering field, or,SortableAdminMixin
form WorkflowAdmin
Or, I might need to look deeper, since django-admin-sortable2 throws an assertion error, if I remove SortableAdminMixin
.
Hey, it turns out, I did use SortableAdminMixin
instead of SortableAdminBase
when adjusting for the latest version of django-sortable-admin. @joshyu Can you check with the above fix?
@fsbraun , Sorry I was blocked with another high priority requirement. I will ask @FreemanPancake to check it and feedback to you later.
Hi @joshyu and @fsbraun , I have installed this fix version on django-cms-quickstart project, and it worked. Thank you all for the outcome.
@FreemanPancake That's great news! I think we're approaching a level of stability where we can publish moderation on pypi.
fixed by #279
Description
I try to install djangocms-moderation into django-cms-quickstart project: https://github.com/django-cms/django-cms-quickstart to test out the versioning management and workflow. but below error popped up when create new workflow:
Steps to reproduce
Expected behaviour
Workflow creates normally
Actual behaviour
encounter error
Screenshots
Additional information (CMS/Python/Django versions)
Django 4.2 Python 3.11 Django-CMS 4.1.2
Do you want to help fix this issue?