#django

/

      • kl4us joined the channel
      • FunkyBob
        it's a "potential" query which, when iterated, will yield records
      • madprops
        I thought it already had the records hmm
      • kl4us has quit
      • uuball_gabriel
        is there any method to slice the QuerySet object?
      • Cromulent joined the channel
      • mattmcc
      • moneydouble joined the channel
      • japandroid has quit
      • FunkyBob
      • felix89 joined the channel
      • jayant__
        how are you guys ?
      • estebistec has quit
      • calvinx has quit
      • rudedogg has quit
      • moneydouble has quit
      • eppa is now known as eppa|codeshop
      • schinckel
        jayant__: Not too bad. It's friday, after all!
      • rudedogg joined the channel
      • epicowl joined the channel
      • jayant__
        hahaha :D
      • nice
      • schinckel
        uuball_gabriel: You can't slice it from the end, only the start.
      • FunkyBob
        schinckel: ooh.. getting close to beer o'clock
      • schinckel
        I actually had a G&T last night: first one in months.
      • FunkyBob
        uuball_gabriel: but you can reverse() it and the slice from the start
      • mattmcc
        Speaking of beer.. *heads out*
      • eppa|codeshop
        ooh
      • jayant__
        i am leaving on monday so will have to cover some time on the weekend :P
      • anyways, i need a few answers
      • AlbireoX joined the channel
      • nanonyme
        mattmcc, I still have one Friday exam. yay
      • rydgel joined the channel
      • jayant__
        i have a custom registration that handles token generation and email that token to the user, i tested the registration app by writing tests script, it works good but the same doesnt work in another tests script in a different app
      • cyong has quit
      • McMAGIC--Copy has quit
      • the custom registration basically acts on post_save signal of the User model
      • rrix is now known as ddix
      • ddix is now known as rrix
      • rudedogg has quit
      • McMAGIC--Copy joined the channel
      • aladdinwang joined the channel
      • epicowl has quit
      • dodobas
        yello
      • twoface joined the channel
      • jayant__
        but the tests in the registration app passed, i got another app depending on the token to be generated but its not working any ideas?? or am i still unclear
      • sudobangbang joined the channel
      • epicowl joined the channel
      • lightstrike has quit
      • rydgel has quit
      • calvinx joined the channel
      • frequant joined the channel
      • naro joined the channel
      • setmeaway joined the channel
      • sohail has quit
      • another problem http://dpaste.com/1205889/ there is something wrong in this code that i cant figure out, here is the traceback http://dpaste.com/1205888/
      • golodhrim has quit
      • golodhrim joined the channel
      • twoface
        jayant__, your PasswordChangeForm requires an extra parameter, and thus cant be used like that in a FormView
      • FunkyBob
        you'd have to override get_form_kwargs
      • twoface
        right, that was the way
      • jayant__
        twoface: alrite, but i am using the forms in the auth app
      • twoface will never learn to use CBVs properly
      • golodhrim has quit
      • twoface
        even though i have a prototype app with ~30 cbvs :/
      • jayant__
        twoface: well i am not sure about me too
      • hwrd|work has quit
      • golodhrim joined the channel
      • bgraham
        we need IDEs where parent classes are layered behind those in the file you're looking at, like transparent overlays in a medical textbook
      • kanja has quit
      • twoface
        not a bad idea
      • golodhrim has quit
      • FunkyBob
        twoface: that method to override was right there in the traceback :P
      • golodhrim joined the channel
      • bja_
        would be interesting to toggle showing inherited things in my editor
      • possibly color coded to let me know when I'm overriding things
      • twoface
        FunkyBob, i guess i just saw CBV and gave up :)
      • PoliticsII
        Pycharm lets you break off editor tabs into their own windows, and also has an effective goto-declaration choice in the context menu
      • bja_
        actual IDEs probably alreayd do that, but I'm pretty sure python-mode doesn't do that
      • _Codewaffle_ joined the channel
      • PoliticsII
        and has some shortcuts for going to overridden methods
      • corehook joined the channel
      • FunkyBob
        find me an editor that will tile windows
      • PoliticsII
        I can't speak for every IDE, but PyCharm works very nicely for exploring inheritance relationships.
      • eppa|codeshop
        FunkyBob: emacs, dude
      • jayant__
        FunkyBob: twoface override the get_form_kwargs to what?
      • FunkyBob
        eppa|codeshop: bit me :P
      • eppa|codeshop: vi does it just fine
      • bja_
        it'd be nice to say ,ca ,cA ,ci to toggle class inheritance views in vim the same way that I can toggle folding via za zA and zi
      • FunkyBob
        jayant__: to return the extra arguments the form needs, of cours
      • jayant__: didn't you read the code in the traceback?
      • phix
        i use pydev
      • PoliticsII
        Also, PyCharm lets you split editor tabs into tiles.
      • bja_
        FunkyBob: vim will tile windows for you
      • jayant__
        FunkyBob: yes, but i cant see any extra arguments the form is expecting :(
      • FunkyBob
        bja_: as I said, vi does it fine [and, therefore, so does vim]
      • xav joined the channel
      • jayant__: that's where you looka t the source of the form, of course
      • Ingraft has quit
      • twoface
        jayant__, its python - its easy to read your libraries source when you have issues like this :)
      • FunkyBob
        jayant__: it inherits from SetPassword form, which has def __init__(self, user, *args, **kwargs):
      • MaRiNkO joined the channel
      • Codewaffle_ has quit
      • Cromulent has quit
      • jayant__
        FunkyBob: aaah thanks, my eyes skipped that
      • phix
        bob is too funky imo
      • FunkyBob
        in fact, help() on that form would have told you the same thing
      • phix: I shower (almost) every day!
      • phix
        an
      • bja_
        btw, can anyone think of an ide that does inheritance toggling out of the box?
      • phix
        and ,
      • schinckel
        I think he means the music that plays when you enter a room.
      • phix
        and use deorderant?
      • FunkyBob
        schinckel: I must be more deaf than I realised...
      • phix: of course
      • phix
        you should invest in something a bit stronger :)
      • schinckel boom-chicka-wah-wah
      • heh
      • dannib has quit
      • dannib joined the channel
      • hexsprite has quit
      • golodhrim has quit
      • golodhrim joined the channel
      • domino14 joined the channel
      • domino14
        does this make sense to anyone? I have a CharField that sometimes mysteriously seems to lose all its line breaks
      • EyePulp has quit
      • twoface
        yes - you made a mistake somewhere :)
      • mattmcc
        Do you actually not see them in the DB? Or do you just not see them in the browser? (Browsers strip whitespace)
      • twoface
        or you are rendering it in html and expecting linebreaks to be visible
      • passy joined the channel
      • domino14
        they disappeared from the database
      • twoface
        then you have edited it somewhere that didn't preserve them
      • domino14
        i've been switching back and forth between branches
      • twoface
        nothing in django strips your whitespaces for you
      • domino14
        the only place i modify that CharField is in profile.profile = pForm.cleaned_data['profileText'] -- maybe cleaned_data is acting weird
      • MaRiNkO has quit
      • MaRiNkO_ joined the channel
      • golodhrim has quit
      • twoface
        no, nothing is acting weird!
      • vakaras joined the channel
      • golodhrim joined the channel
      • perhaps your form cleans the field and does something to it
      • tkaemming has quit
      • domino14
        my form has no cleaning code itself, plus I never hit the endpoint to activate that code
      • profile.save() is called elsewhere, but if I haven't made any modifications to profile.profile, that value should stay.. maybe it's MySQL's fault
      • golodhrim has quit
      • PoliticsII
        I don't suppose you're using an IDE where you can just throw a breakpoint in and inspect the data that's coming in.
      • That really would be ideal.
      • maZtaiR joined the channel
      • jtiai
        also using build in pdb or separate ipdb is another good options for debugging.