2008-6-7

21:32 brosner
hey ericflo
21:32 ericflo
hey brosner
21:32 brosner
came across a bit of a bug in #6095
21:32 DjangoBot
21:32 ericflo
Good to know, what's going on?
21:33 brosner
validation.py breaks with self-referenced m2m and through
21:35 ericflo
brosner: Ohh, good edge case, I don't think there's a test for self-referential m2m and through
21:35 brosner
i tried formulating a patch, but got side tracked ;)
21:35 ericflo
brosner: I'm on it :)
21:35 brosner
great :)
21:38 C8E
ericflo: welcome back, floguy :)
21:38 ericflo
C8E: Didn't realize I was gone!
21:39 C8E
lol
21:39 C8E
your last mail in django-dev was on 17th may :P
21:42 ericflo
C8E: Ahh I see. Yeah, I've been living over in user land doing django apps and not peering into the internals at all.
21:43 C8E
ericflo: ah, sorry. i can't follow dj-users
21:44 ericflo
C8E: Haven't been posting there either, lol. Just off in my own little world I guess. :)
21:45 ericflo
brosner: What's the use case for that, anyway? Thinking about a model being m2m related to itself through itself going through itself makes my brain hurt a lot.
21:45 C8E
ericflo: you've been around the world, afaik
21:46 brosner
ericflo: it doesn't go through itself. my case is a Product model with a related_products m2m with self going through a RelatedProduct model
21:46 ericflo
C8E: Ahhh, nope, I'm leaving in a few days to begin on that crazy crazy journey.
21:46 C8E
ericflo: to mochi-city, ya mean? ;)
21:47 ericflo
C8E: Yep, and then Japan, then back to Minnesota, then back to mochi-city, lol. It's gonna be quite a ride.
21:47 C8E
ehehe
21:47 C8E
ericflo: ja luky man :P
21:47 ericflo
brosner: I see what you're getting at. That makes more sense.
21:48 brosner
ericflo: do you have this in a git repo i can look at. id like a patch of the patch :P
21:48 ericflo
brosner: I do, but it's local and I don't have a port punched in my firewall.
21:49 ericflo
brosner: I'm such a git-noob. I use it like SVN lol.
21:49 brosner
fork my repo on github and push there
21:50 ericflo
brosner: I'm gonna update the patch locally first, then figure out how to share it better.
21:50 brosner
ok cool
21:50 brosner
or if you really wanted just do a git diff between the commits and send me that ;)
21:51 ericflo
that would work too
22:11 ericflo
brosner: gah I got distracted, back to patching
22:11 brosner
:)
22:30 ericflo
brosner; This is a bigger bug than I thought. Self referenced M2M doesn't work right now at all through a model. I've got some tests, now for the fix...
22:30 brosner
so it was more than just the validation.py code?
22:31 ericflo
brosner: Yeah, definitely.
23:06 ericflo
brosner: Well I got it working, pretty simple patch, but it brings up another bug.
23:06 ericflo
brosner: Symmetric-ness
23:06 brosner
yeah that was my next thing ;)
23:07 ericflo
brosner: Working on that now
23:07 ericflo
brosner: Haha, do you have anything else I should be looking for? I'm not good at these edge cases, I guess.
23:07 brosner
in my m2m i have set symmetrical to False as well, but didn't get that far
23:07 ericflo
ok
23:08 ericflo
I'm using a case of Person and intermediary of Friendship, so I think this is actually not such an edge case, but something that many people will want to use.
23:11 brosner
yeah pownce would have a use case for no symmetrical relationships defined on the m2m if that was how they did it
23:12 ericflo
brosner: Actually, symmetric-ness doesn't really make sense with intermediary models since it's only invoked by add()
23:12 ericflo
brosner: Which no longer exists.
23:12 brosner
ah right
23:12 ericflo
brosner: If it comes back, all the machinery still works, from what I can tell.
23:13 brosner
the use of an inline in nfa would make the relationship not symmetrical by default
23:13 ericflo
OK
23:13 ericflo
Would there still be a way to make that widget apply changes symmetrically?
23:14 ericflo
I gotta learn more about these inlines.
23:14 brosner
hmm
23:14 brosner
basically an inline is a wrapper around a queryset.
23:14 brosner
in an inline formset it implies the fk relationship
23:15 ericflo
Makes sense
23:26 ericflo
brosner: I've got a git diff now.
23:27 brosner
awesome
23:30 Alex_Gaynor
Is there any way to have git make a diff that SVN plays nice with?
23:30 ericflo
Alex_Gaynor: Does SVN even handle diffs?
23:30 ericflo
Alex_Gaynor: I always use patch
23:30 Alex_Gaynor
ericflo: Bah, I meant some of the SVN tools like Trac
23:31 brosner
it does work in trac
23:31 brosner
ericflo: yay #6095 is now even better ;)
23:31 DjangoBot
23:32 Alex_Gaynor
Hrm, first I thought it was patches that were too big, then I thought it was git diffs, what does cause Trac not to display patches :D
23:32 brosner
not sure
23:33 brosner
it may even be fixed for their next release
23:33 Alex_Gaynor
I didn't think of that, hope so, the new version also has the nice JS foldout things for folders in the borwser :D
23:38 ericflo
OK uploaded the new patch to the ticket, gotta go for now though. Hopefully this works better for 'ya, brosner.
23:38 brosner
awesome man. thanks for your quick help and fixes :)
23:39 ericflo
NP
23:41 cramm
Hi, guys. I trying to revive the MS SQL backend (as in make it really work and update it to qs-rf) and one of the things needed is it is really an external backend (i.e. without need to patch Django itself) is, when working around some characteristics of the RDBMS, not use if settings.DATABASE_BACKEND == 'mssql' (or 'mysql) buy rely on some more generic backend property...
23:42 cramm
23:42 cramm
do you think a path like the one in th patch that would be worthwile pursuing?
23:44 cramm
In the case of the MS SQL it has one shortcomming in common with Oracle and another with MySQL, so that's why i've decided to switch these "if"s to test for the values of (newly-added) connection.features attributes
23:52 empty
cramm: agreed. Those types of special cases shouldn't be done that way if you want it pluggable.
23:52 empty
Although you could override method itself.
23:54 cramm
empty: that's precisely what I'm doing for special cases that just involve this new backend. But i've decided to generalice the cases where there are two backends to special case
23:55 empty
cramm: I think that's good.
23:57 cramm
empty: i've seen django-sqlalchemy is being updated again :)
23:57 empty
cramm: yeah I've been steady on it. I just do some things in local branches when they might be disruptive. I've got to the hard places now. :)
23:58 cramm has perused over the code of the SA and the firebid backends trying to learn the ropes of a custom db be
23:58 cramm
empty: cool
23:58 Alex_Gaynor
cramm: Are you going to be working with the current db backend projects for MS(I think there are 2 of them(
23:58 empty
cramm: it seems to me that a mssql backend would be fairly easy.
23:59 empty
but then again I haven't dealt with the backend code all that much.
23:59 empty
cramm: are you targeting 2005 or 2000
23:59 cramm
I'm afraid to use overriding internal django methods that are big from the external backend because it would mean that the external backend would need to track Django development