Those commits are best viewed one after the other, it's clearer that looking at the whole branch diff.
Could we get a small docblock on this? Also, I know it's not really part of this PR, but separately if you could write a docblock for the widget model that would be great. I don't know what the difference is between idx (this is short for index, right?) and index on the model is.
idx
index
I think this would read more naturally in English if it was called widget_indices, but I realise the model field is idx so that would probably just be confusing.
widget_indices
:clap:
Looks good to me. It'd be good to have the docblock, but it's not a blocker to merging this, especially if you're willing to docblocking the model itself in a later PR. Merge when ready (I think you have the power to do so this time)!
I've added the docstring for the method. I can add a docstring for the Widget model, but I'd rather make another PR to keep this one on-topic.
My guess is that the "index" property is used to sort widgets in the center column or the right column, while the "idx" property is just the primary key.
1 new commit added
Ah okay, that does seem likely. A separate PR is what I had in mind, sorry if I didn't communicate that well. I assumed you knew the details of the model, but if you don't it also seems fine to me to file an issue to document the models and we can chip away at it as a group.
In any case, looks good to me!
Pull-Request has been merged by abompard