2008-7-3

23:44 brosner
ericflo: yeah no worries. i might look into it more later
23:44 ericflo
Actually wait, can you dpaste your three models? I feel like I'm missing something here.
23:44 brosner
yeah give me a sec. they are quite large
23:45 brosner
well two models :)
23:45 ericflo
Two models?
23:45 brosner
self-ref
23:45 ericflo
Oh
23:46 ericflo
Forgot about that part
23:46 brosner
23:46 brosner
i cut out a bunch of business logic, but shouldn't be relavent
23:47 ericflo
yeah, working through it now
23:48 ericflo
ahh
23:48 ericflo
wait nvm
23:49 ericflo
Hey, if you do Product.objects.order_by("related_items__sort_order") does it order it correctly (even though there are too many results)?
23:49 ericflo
It might be a bug in queryset
23:50 brosner
the result set would kill my memory
23:50 brosner
hang on
23:50 brosner
i can filter on a product perhaps
23:51 brosner
oh
23:51 brosner
ah i see
23:52 ericflo
??
23:52 brosner
it need to use the related_name
23:52 brosner
s/it/i/
23:52 ericflo
oh, so product.related_items.order_by("related__sort_order") works?
23:53 brosner
ok this is so edge case it aint even funny (on the related_name value)
23:53 brosner
which in this case is... _notsure_ haha
23:53 ericflo
oh, haha!
23:53 ericflo
And that works?
23:53 brosner
which is not working
23:53 ericflo
damn
23:53 brosner
well it might be a bug actually
23:53 ericflo
It's still important though
23:54 ericflo
I'll have to dive into the code later
23:54 brosner
Product.objects.order_by("_notsure___sort_order")
23:54 brosner
gives me _notsure is not a field
23:54 ericflo
I'd try getting rid of the underscores, the triple underscore is screwing it up
23:54 ericflo
can't have a related name with trailing underscore
23:54 brosner
ok i will stop bothering you. ill look into this by fixing my dumb code
23:55 ericflo
But that's a good warning to add! Validation should complain when it sees a related name with a trailing underscore
23:55 brosner
makes sense, but oddly should it work?
23:55 ericflo
Hmmm
23:55 ericflo
Maybe
23:56 ericflo
I'm guessing the code does a my_random_string.split("__")
23:56 brosner
yeah actually and splitting on the first two underscores
23:56 ericflo
yep
23:56 Gulopine
why guess when it's open source? :)
23:56 brosner
laziness right now :)
23:56 ericflo
Because I'm incredibly lazy haha
23:57 brosner
really? what is this open source? :P
23:57 ericflo
Open sauce
23:57 axiak
23:57 axiak
:)
23:58 Gulopine sighs
23:58 Gulopine
thanks :)
23:58 Gulopine not looking forward to more work on that at the moment
23:58 axiak
well it's not just for you, but if you have any comments, please voice them
23:58 Gulopine
yeah, will do
23:58 axiak
I tried to fix everything
23:59 axiak
like the oracle :)
Page 3 of 3   ← Previous  (259 total)