-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-table inheritance #17
Comments
Could you take a look at 1b84890 and see if it does what you need? It seems like there are legitimate reasons to want child models to be ordered independently as well as reasons to want them all to be part of the same sequence, so I added an argument to make it configurable. I stuck with independent ordering as the default, mostly to preserve backwards compatibility. |
Thanks for the quick response! Hmmm, seems like I'm running into some unexpected behavior. I also can't figure out how to run the tests...if I do Your commit seems to have fixed the scenario in which I'm appending lessons/exercises (i.e. creating them without specifying position), but it looks like even before the commit there was an issue that I didn't notice at first. If I create Lesson (0), Lesson (1), Lesson (2), and then I do Happy to play around with it further and write up failing test cases once I can actually run the tests - any ideas there? Thanks again! |
I run the tests like this:
Thanks for being willing to dig in a bit. In the spirit of full disclosure, I should probably tell you that I wrote this code a long time ago and I'm not using it in any current projects, so it doesn't exactly have my full attention. That said, I've tried to keep it working on current versions of Django and to fix bugs as they're identified. If you've got the interest and energy, pull requests are absolutely welcome. |
just curious @jpwatts has this been fixed? |
Sorry; that was sloppy of me. I was trying to clean up a bit around here and wasn't seeing your test fail, but I didn't catch that Django 1.6 wasn't running the doctests. That's fixed now, but this issue is still open. |
Good stuff, thanks. |
I have models like this:
Basically a
SubUnit
contains manyTask
's, each of which may be aLesson
or anExercise
. I'd like to keep track of the position of eachTask
regardless of whether it's aLesson
or anExercise
. If I add aLesson
, it has position 0, and then if I add anExercise
to the sameSubUnit
I expect/want it to have position 1, but it instead has position 0 - theLesson
position counter is totally separate from theExercise
position counter.Do you know of any workarounds for this?
Thank you!
The text was updated successfully, but these errors were encountered: