Code Monkey home page Code Monkey logo

Comments (7)

shuckc avatar shuckc commented on June 4, 2024 1

Resolved by #248

from django-ordered-model.

erikcw avatar erikcw commented on June 4, 2024

This appears to also be the case with the above() method.

from django-ordered-model.

emontellese avatar emontellese commented on June 4, 2024

I actually also just ran into this - I think that you are right.

from django-ordered-model.

emontellese avatar emontellese commented on June 4, 2024

Actually, i think that 'return' may not be right regardless.

If '>' work needs to be done
If '<' work may need to be done. (i.e. just becuase it's already below doesn't mean it's in the right place below).
if '==' work needs to be done

This is just from a quick read-over though.

from django-ordered-model.

emontellese avatar emontellese commented on June 4, 2024

Also it looks like the 'to()' function has some issues in some cases. I'll put together a pull request.

from django-ordered-model.

emontellese avatar emontellese commented on June 4, 2024

Please see #93 for a proposed solution to this and a related issue that I was having in the case where an ordered item is dragged from one list to another.

In this case, I am first updating the order_with_respect_to fields and then calling "above()" -- but this does not work in the trunk because the 'order' value of the dragged item is identical to the 'order' of an item in the existing list.

from django-ordered-model.

shuckc avatar shuckc commented on June 4, 2024

My take on this is that we need to fix .save() when changing fields contained in order_with_respect_to to maintain the predicate that the items are in order within the old and new groups. Attempting repair work in .to(), .above(), .below() methods is not a good solution. So really this ticket is the same issue as #121 and #85. I've hit this myself so how to sort it out for the first 2.0 release.

from django-ordered-model.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.