Open chavu opened 6 years ago
Thanks for the suggestion
It looks like we're not using the Order field as you note
It might be as simple as setting up ordering on the model to use this field. It might have ramifications elsewhere though
class Result(models.Model):
class Meta:
ordering = ['order']
This doesn't give you the drag and drop of course
Has this ordering been fixed and checked-in? How do I update my live instance of Kashana?
@chavu I haven't made this change because I am not sure if it will break functionality. If you're willing to test this for us I can make the change on a branch.
To update your local instance of Kashana you can do git pull origin master
from within the folder where you have Kashana checked out.
If you're using our fabric deployment script to deploy Kashana to a remote server, just rerunning the script should suffice
Yes I'm willing to test the changes.
I made the change below on my kashana instance and its working ok. So I think you can make the change in the main branch.
class Result(models.Model): class Meta: ordering = ['order']
However it's still a pain to manage the ordering manually from the admin page. For example to insert something in the middle of the list I have to manually re-enter the ordering for all entries downwards. Therefore we still need drag and drop. Alternatively in the Admin you can provide a drop-down field to select the entry on which you want the new entry to follow, then the program does the re-numbering.
Ordering in the model fixed in https://github.com/aptivate/kashana/pull/75
I'm trying to change the order of activities or result area entries but it is not working. I'm doing that in the backend by change the value of the 'Order' field. It would nice if you can provide drag-and-drop visual ordering in the front-end (Dashboard)