#django

/

      • Goopyo joined the channel
      • CmdX has quit
      • mattmcc
        rakl: Not enough to worry about.
      • rakl
        awesome, thanks
      • davidbrenneman has quit
      • lietu has quit
      • lietu joined the channel
      • WaqarAzeem joined the channel
      • tkaemming has quit
      • rafaduran joined the channel
      • naro joined the channel
      • thepeculiarform has quit
      • hell_razer joined the channel
      • Back2Basics joined the channel
      • molavy
        FunkyBob, is not enough if i return json data to backbone.js to backbone work with django?
      • to make backbone work with django
      • voidus joined the channel
      • FunkyBob
        molavy: more or less, yeah
      • molavy
        tastypie affect whole project , FunkyBob, all models and url need resources
      • FunkyBob
        no
      • I am writing a light-weight JSON API tool... but it's not quite ready yet
      • nvandijk joined the channel
      • hell_razer has quit
      • cebor joined the channel
      • cybin has quit
      • missfilly joined the channel
      • missfilly has quit
      • Shadow_S has quit
      • missfilly joined the channel
      • hoot_ has quit
      • arietis joined the channel
      • martian joined the channel
      • martian
        I've got a series of statements in a view that set a value of an existing object only if a value on the form was specified. Given the following sequence, is there a better (dry) way of doing this? http://pastebin.com/dm25R9gH
      • hoot joined the channel
      • Linovia
        martian: something like that: http://dpaste.org/oRWtY/ ?
      • setmeaway has quit
      • setmeaway2 joined the channel
      • Megido has quit
      • hoot has quit
      • missfilly has quit
      • bluepnume has quit
      • kristallpirat has quit
      • cyberdelia joined the channel
      • m0n5t3r joined the channel
      • m0n5t3r has quit
      • m0n5t3r joined the channel
      • kristallpirat joined the channel
      • Gambit-
        hey guys, is there any pastebin I can use to demonstrate a django app that's misbehaving?
      • Linovia
        Gambit-: like the one mentionned by the chan topic ?
      • Gambit-
        ah it truncated
      • well that was a little more rudimentary than I was expecting, but okay :)
      • zeograd joined the channel
      • Well there's this reproduction: http://dpaste.org/QCAMw/
      • That's not actually reproducing exactly the problem I'm seeing on the other branch, but it still seems wrong.
      • django+tastypie
      • hirokiky joined the channel
      • hoot joined the channel
      • gabrielo has quit
      • Linovia
        well, I don't really know about tastypie, but there's an irc chan for it
      • FunkyBob takes a peek
      • hirokiky has quit
      • gabrielo joined the channel
      • Gambit-
        oy FunkyBob
      • http://dpaste.org/srjFD/ has the actual backtrace
      • it's not the actual error I ran into in my project - that's a silent failure on actually adding the equivilent of the TestTP0 model, but babysteps.
      • martian
        Oh Linovia yes, like that! I'm still learning to think in python :)
      • huntercool joined the channel
      • lcastro joined the channel
      • Linovia
        apollo13: ping
      • bmonty joined the channel
      • jargon joined the channel
      • apollo13
        Linovia: pong
      • Linovia: that was fast, what did I break?
      • Linovia
        apollo13: nothing, and your last commit answers my question ;)
      • apollo13
        FunkyBob: is it backwards incompatible?
      • Linovia
        answered
      • apollo13
        Linovia: hehe, what was the question?
      • Linovia
        about the use of django.utils.six instead of six
      • apollo13
        ah
      • Linovia
        (for django-filter)
      • apollo13
        yeah using six as a dependency on python 2 is somewhat hard
      • Gambit-
        FunkyBob, any luck?
      • apollo13
        but with the release of 1.5 django 1.3 won't get security upgrades so I just dumped it
      • Linovia nods
      • FunkyBob
        apollo13: probably
      • JesperSHansen joined the channel
      • apollo13
        FunkyBob: please verify and open a release blocker then
      • FunkyBob
        apollo13: oh, you mean the onetoonefield thing?
      • apollo13
        ye
      • +s
      • FunkyBob
        hrm
      • affix has quit
      • kristallpirat has quit
      • apollo13
        I will hate you for it but that's live
      • Gambit- really thinks there's a bug in tastypie, where it can't handle more than one-level-deep m2m hydration.
      • FunkyBob
        apollo13: question is... is it wrong?
      • apollo13
        FunkyBob: does it break code running on 1.4, then yes
      • FunkyBob
        only if that code is relying on documented behavior
      • apollo13
        I know that I always hate ForeignKeys for raising DoesNotExist, it makes sense if OneToOne does the same, but we at least have to mention it in the release notes and verify it
      • yes hence a ticket and a testcase so other core devs can verify it
      • FunkyBob
        ok
      • djangoobie joined the channel
      • apollo13: looks close
      • apollo13
        36. if getattr(obj, 'author', 'None') is 'None': <-- his code is intresting^^
      • FunkyBob: so according to him it already raised DoesNotExist in Django 1.4?
      • FunkyBob
        apollo13: heh. yeah, I noticed that too...
      • guess he's doing something differnt
      • this case was code I worked out of InheritanceManager in django-modelutils
      • sorru... family is heading to watch NYE fireworks
      • apollo13
        already?
      • FunkyBob
        9pm... for the kids
      • apollo13
        ah, ok -- if you can make a testcase that would be great, we want to ship RC asap but I guess you have time till tomorrow ;)
      • don't get shot!
      • FunkyBob
        yep, will do
      • apollo13
        (/me hates fireworks in combination with stupid people shooting them :( )
      • JamJar has quit
      • johnraz joined the channel
      • spinus joined the channel
      • spinus
        hi
      • scrapper joined the channel
      • ObseLeTe joined the channel
      • superdmp joined the channel
      • margitan joined the channel
      • ploufplouf has quit
      • ploufplouf joined the channel
      • margitan
        i'm having a hell of a time with a urls.py config. " r'^(?P<slug>[a-zA-Z0-9-]+)/dashboard/' keeps resolving to r'^(?P<slug>[a-zA-Z0-9-]+)/$
      • spinus
        I have some app in dango, that uses __repr__ method of User while debugging and logging, but when user is retreived from request object is wrapper with SimpleLazyObject. This object does not pass __repr__, you think it should? I monkey-patch it to return somethink like <SimpleLazyObject: %r> but I am not sure I should make a ticket for that (with a patch) or it is intendet to not call _wrapped.__repr__. Please tell me whether I should make a t
      • hirokiky joined the channel
      • racycle has quit
      • Linovia
        spinus: why don't you use the __unicode__ method ?
      • molavy has quit
      • molavy joined the channel
      • spinus
        @Linovia: I am using __unicode__ for rendering user content for models (I hope it is the correct way) and __repr__ to use it for internal use, for example __unicode__ tells me someuser@somedomain.com and __repr__ tells me <User: pk:2 email:something poins:100> - something which is usefull in logs, and while logging I use %r and in user content I use %s.
      • Linovia
        I see
      • this being said, I'm not surprised the SimpleLazyObject doesn't pass the __repr__ since it'll represent the SimpleLazyObject :)
      • jdunck has quit
      • sackrebutz joined the channel
      • spinus
        @Linovia: but you think it sould? I just wanted to make sure this will be 'usefull' before I make a ticket.
      • nicklo has quit
      • skandocious joined the channel
      • skandocious
        anyone familiar with pagination in django?
      • spinus
        @skandocious: a little
      • sackrebutz
        hey there! how can i tell my django model that field1 and field2 are required, but only one of them must be set?
      • skandocious
        what happens if the ordering of my objects changes between fetching new pages
      • spinus:
      • nicklo joined the channel
      • sayan has quit
      • spinus: say for example I'm paginating by 3, and on the load of page 1 my objects are ordered: a,b,c,d,e,f,g,h,i <-- 3 pages worth
      • but between they fetch page 2, object d gets updated, and it pushes it to the top of my ordering --> d,a,b,c,e,f,g,h,i