• FunkyBob
        asakapab0i: if you're migrating django apps to py3, "six" is a really useful package
      • bdmc
        schnickel: I was introduced to it in the tutorials, and found it in the documentation.
      • oakridge has quit
      • siqi_ has quit
      • asakapab0i
        Alright, I need to read some articles probably a good idea to research first.
      • schinckel
        ghostmoth: Maybe look at what the query being generated is?
      • zz_ryanneufeld is now known as ryanneufeld
      • ghostmoth
        good idea
      • siqi_ joined the channel
      • the_rat joined the channel
      • schinckel
        dpaste the two queries, and we'll see what differs.
      • kenbolton has quit
      • il has quit
      • siqi_ has quit
      • nlh joined the channel
      • FunkyBob
        morning, nlh
      • ojh joined the channel
      • nlh
        FunkyBob :)
      • SoftwareMaven has quit
      • jtuz has quit
      • Qowface joined the channel
      • atula joined the channel
      • Jarus has quit
      • stickperson has quit
      • Derailed has quit
      • Kronuz has quit
      • dethos joined the channel
      • realnot joined the channel
      • Jarus joined the channel
      • il joined the channel
      • TSMluffy has quit
      • ArcTanSusan has quit
      • ArcTanSusan joined the channel
      • ToastOffice joined the channel
      • bogeyd6 joined the channel
      • atula has quit
      • atula joined the channel
      • eVRiAL has quit
      • inad922 has quit
      • jeffheard has quit
      • iClunk has quit
      • inad922 joined the channel
      • jeffheard joined the channel
      • tac_ has quit
      • lieber has quit
      • codeitloadit has quit
      • fission6 joined the channel
      • acangiani joined the channel
      • areski has quit
      • micah_chatt joined the channel
      • hydraidm801 joined the channel
      • johnnydiabetic joined the channel
      • iClunk joined the channel
      • hydraidm801
        I have an interesting problem
      • I installed djangoCMS
      • mekhami
        is there a freenode chan that can help me with network issues
      • hydraidm801
        when I use the interface to make a new subpage it creates a real basic html markup. I can't figure out where or how this markup is being generated
      • FunkyBob
        hydraidm801: surely that's covered in their documentation?
      • micah_chatt_ joined the channel
      • micah_chatt has quit
      • micah_chatt_ is now known as micah_chatt
      • hydraidm801
        hahaha oh FunkyBob your hillarious!
      • tac_ joined the channel
      • I know pages are created in admin so it probably uses some middleware to accomplish this
      • ArcTanSusan has quit
      • Leucomelas has quit
      • themsay has quit
      • FunkyBob
      • Fush_ joined the channel
      • inad922 has quit
      • il has quit
      • govg joined the channel
      • kenbolton joined the channel
      • onizo619 has quit
      • bwreilly has quit
      • inad922 joined the channel
      • andrew9183 has quit
      • Greener
        Hi all, I'm trying to save a user-uploaded file in a db. This is what I have: https://gist.github.com/anonymous/70d6740afcb67...
      • Everything works fine until the save() on the last line.
      • I'm not sure how to approach debugging this.
      • FunkyBob
        wait.. you want the file contents _in_ the db?
      • or are you just using a FileField?
      • Greener
        Er, yeah, that was badly said. I'm using a filefield; django can do whatever magic it wants to store it. :p
      • FunkyBob
        also... you should consider conforming to standard Python naming practices
      • StubAcceptFile would be a class name... you should use stub_accept_file for a function
      • if it's a Filefield on a model, your simplest option is to use a ModelForm
      • also... HttpRequest is the class name... you should call the first argument "request"
      • cewing is now known as cewing|afk
      • holler_ has quit
      • tkimmel has quit
      • and finally... you should not define the upload_to function as a method on the class... it won't work
      • Greener
        Everything is noted - that last part was from following tutorials, though. Let me double check where I got that from.
      • FunkyBob
        not the official tutorial, it's not
      • shiver joined the channel
      • Greener
        Hm. Where should that function go instead?
      • ghostmoth has quit
      • I just moved it outside the class, and I'm not sure if that helps or not. (The mystery error is still happening)
      • csotelo has quit
      • romance joined the channel
      • FunkyBob
        well, as I said... your easiest path to success here is to use a ModelForm
      • it's what I always do... because I can't be bothered remembering how to do it otherwise :)
      • kaakku joined the channel
      • bnmalcabis has quit
      • Greener
        All righty, I'll look into that instead. Thanks!
      • johnnydiabetic has quit
      • bsilverberg has quit
      • sudobangbang joined the channel
      • micah_chatt has quit
      • gratimax is now known as gratimax|away
      • gustaf_offline is now known as supergustaf
      • dangayle has quit
      • datakid joined the channel
      • datakid
        the other night at the DjangoMelb meetup, the host(I'm bad with names) mentioned an issues with dates - depending on what fn you call, you might get the "date server restarted" rather than "today". Can anyone recall what that was about? I think I've just walked into that
      • ArcTanSusan joined the channel
      • kenbolton has quit
      • drapetomaniac joined the channel
      • jMyles has quit
      • ArcTanSusan has quit
      • FunkyBob
        datakid: I don't remember that...
      • datakid: sounds like the differnce between "default=date.today" and "default=date.today()"
      • the former, being a callable, will be called each time a default value is needed
      • the latter will call it once to provide the value... and that call will be on first import of the module
      • mekhami has quit
      • SpartanWarrior has left the channel
      • bdmc
        I'm trying to get my head around some logic for a project ( app ) that I am involved with, and knew where to come.
      • FunkyBob
        datakid: which night was that?
      • datakid: or do you mean MelbDjango School?
      • bdmc
        I have a page that has a menu of several items. Each of those items will go to a form where data is collected and submitted.
      • I am looking at the polls tutorial ( again ), and not sure how to resolve my needs with what it is showing.
      • In the first place, in my menu, do I put the name of the view that does the actual data storage, or another "buffer" one, to display the form?
      • FunkyBob
        bdmc: won't the menu be included on all [most?] pages?
      • bdmc
        The first time it is called, the POST will be empty, but that --
      • ArcTanSusan joined the channel
      • FunkyBob
        so the "menu" is just a page of links to other pages... each of which has a form?
      • ShinySides has quit
      • bdmc
        This is a two-level menu. The first page displays some general information, and then has a menu -- think a Profile page. The first page shows Name, e-mail, etc.
      • But, it has a menu at the top for change password, edit user data, edit e-mail addr, etc. How's that?
      • FunkyBob
      • so you want a number of pages for editing _parts_ of your user/profile data?
      • bdmc
      • FunkyBob
      • schinckel
        datakid: Even more nefarious is if you pass a mutable object (like a dict or list literal) as the default argument to a function. It uses that for each function call, mutating it each time.
      • FunkyBob
        so each of those pages will be a simple modelform processig page
      • schinckel
        def foo(bar=[]): ...
      • datakid: If you mutate bar in the function, then it will probably surprise you!
      • tdelam has quit
      • mebus has quit
      • bdmc
        How do I write the urls.py and views.py? Do I write one for the unused form, and one for the processing of the data, or one that covers both?
      • Salihu joined the channel
      • schnickel: I didn't expect that you would still be around. It must be getting late for you. It is for me.