#django

/

      • SmileyChris
        Ohmnivore: you're right that you don't need the explicit id autofield though, it'd be the default anyway
      • malgorath
        FunkyBob: Stock tracking and shipping would be a perk
      • Ohmnivore
        yay!
      • print imagesForm.save() gives [] uh oh
      • but print imagesForm.forms[0].save() returns AdImage Object
      • dafuq
      • SmileyChris
        so did it save to the db that time?
      • schinckel
        Ohmnivore: What does the FormSet look like?
      • SmileyChris
      • niki_ has quit
      • mekhami_ joined the channel
      • Ohmnivore
        lol i thought you wanted a screenshot
      • schinckel
        Ohmnivore: AdImageFormSet?
      • Ariel_Calzada joined the channel
      • Ohmnivore
        yup imagesForm.forms[0].save() saved to db
      • schinckel
        Ah, missed that at the start.
      • Hmm. Can't remember what an inline formset returns.
      • (when you save it)
      • niki_ joined the channel
      • malgorath
        FunkyBob: did I stump ya? (first time for everything I guess)
      • SmileyChris
        schinckel: return self.save_existing_objects(commit) + self.save_new_objects(commit)
      • schinckel
        Yeah, just got to that.
      • Ohmnivore: Can you drop into a debugger before the formset.save(), and step through that?
      • SmileyChris
        Ohmnivore: step into formset.save this time
      • and step into save_new_objects
      • limbera
        is there a reindent.py equivalent for HTML
      • FunkyBob
        malgorath: not really...
      • FunkyBob points at kogan.com
      • I've done what you want, but not as an app
      • skylite has quit
      • have you looked at django-oscar ?
      • malgorath
        FunkyBob: a bit, seems a bit complicated but I'll consider it further
      • Ohmnivore
        schinckel: sure
      • limbera
        malgorath: not the answer to you question, but don't use paypal
      • stripe is far better
      • i hate grappling with paypal, although braintree is a step in the right direction
      • Ohmnivore
        schinckel: well actually form.save() saves to db as expected
      • FunkyBob
        malgorath: if you can, avoid anything to do with paypal
      • Ohmnivore
        schinckel: imagesForm.save() doesn't do anything it seems
      • malgorath
        limbera: been using paypal since it came out, done probably over $300K in transactions with them with no issues
      • FunkyBob
        malgorath: for instance... their sandbox does not behave the same as production
      • geetar joined the channel
      • malgorath
        FunkyBob: Why do you say that? Just curious as I have heard some people not like them
      • limbera
        malgorath: i'm not saying you can't use it well
      • stripe is just incredibly easy to use
      • FunkyBob
        their docs are fucking atrocious
      • limbera
        and i'd suggest you might have done over 300k if you had used someone else!
      • :P
      • malgorath
        yeah when I made a php shopping cart I had to 'fix' some things to interact with PP properly
      • limbera
        their customer support is atrocious too
      • geetar has left the channel
      • malgorath
        I'm in canada so I don't know if stripe is even available up here for me
      • FunkyBob
        if it's available in AU, surely it's in Canada?
      • schinckel
        malgorath: More likely available for you than those of us over here in AU/NZ.
      • djm- joined the channel
      • limbera
        stripe.js is amazing
      • although i think braintree has implemented similar features
      • SmileyChris
      • Ohmnivore
        schinckel: if u want i can dump the whole thing into a git repo
      • malgorath
        looking at the comparison though, seems for my volume per month strip is more expensive as I tend to do 5-8K per month through online payments and if I have a shopping cart that will likely double or triple
      • meisth0th has quit
      • opnchaudhary_ joined the channel
      • limbera
        yeah but you're talking losing $100 or so dollars
      • for the benefit of not being on paypal
      • ahahah
      • rogue_michael has quit
      • i suppose to the user they don't care who you use, as long as it works
      • malgorath
        yeah I guess that balances with good CSR and good documentaion
      • limbera
        and if you like paypal and understand it deeply then no point changing
      • malgorath
        IDK, righ tnow I'd be happy with a shopping cart then I'll worry about payment gateways later
      • Threedee joined the channel
      • SmileyChris
        schinckel: ps, only AU not AU/NZ :'(
      • telex joined the channel
      • FunkyBob
        what's a good music player for macos?
      • malgorath
        Decibel
      • Does almost all the formats
      • FunkyBob
        almost all? does it do flac?
      • johnraz joined the channel
      • malgorath
        Yup
      • does not do some DSD, SACDs, and .iso images
      • Jellydog has quit
      • Ohmnivore
      • brxs joined the channel
      • the issue is that imagesForm.save_new_objects() returns an empty list
      • SmileyChris
        Ohmnivore: so did you step through that tooo?
      • Ohmnivore
        SmileyChris: yup
      • SmileyChris
        Ohmnivore: is it iterating self.extra_forms ?
      • Ohmnivore
        hmm how do i check that
      • SmileyChris
        Ohmnivore: when you stepped into save_new_objects, what was the flow?
      • Ohmnivore: as you step through it you would have seen it looping these
      • Ohmnivore
        uhm it just printed []
      • SmileyChris
        Ohmnivore: what did?
      • kanja
        So I just deployed my site to two servers - CachedFileStorage is creating a different fingerprint for the base css file on the two servers
      • Ohmnivore
        SmileyChris: print imagesForm.save_new_objects()
      • FunkyBob
        malgorath: decibel doesn't react to the media control keys when it's not in focus... a bit annoying :/
      • SmileyChris
        Ohmnivore: so use pdb to step into it and see what is happening
      • atlasloewenherz joined the channel
      • malgorath
        I don't use them ever FunkyBob sorry
      • bjb has quit
      • kanja
        I'm deploying from git and git comais that every file is exact -
      • FunkyBob
        wonder what it'd take to port Rhytmbox :P
      • kanja
        what could be causing a different hash for the files OTHER than the file contents?
      • malgorath
        FunkyBob: IDK, is it in python or TK?
      • kanja
        there's a ton of different files - all of them EXEPCT the main css file (the most important one of course) are working perfectly
      • bjb joined the channel
      • malgorath
        FunkyBob: if you can find the source, maybe try to compile it manually and se if it works :D
      • yassine joined the channel
      • Ohmnivore
        SmileyChris: hmm now im getting an '[u'ManagementForm data is missing or has been tampered with']' error
      • atlasloewenherz has quit
      • malgorath
        I really wish Mezzanine was using 1.7, it would make my life so much more easier. Wife could edit her own pages and leave me alone.
      • djapo joined the channel
      • Ohmnivore
        SmileyChris: ill sort that out brb in 5 min
      • codeme joined the channel
      • NBhosting joined the channel
      • hillaj joined the channel
      • FunkyBob
        malgorath: heh... what's why I wrote gnocchi-cms... so my wife could do her own sites
      • malgorath: and now I'm trying to find a front-end person to commit to helping mw with my next CMS
      • NBhosting
        is it possible to post a form contents to a url instead of opening a view with form that redirect there
      • malgorath
        FunkyBob: I seem to only do Frontend work now a days even though I think I'm horrible at it, I get good reviews on stuff
      • like most of our clients love our site for some reason: http://canineharmony.com/
      • FunkyBob
        gah... FUCK YOU GOOGLE! DON'T RETURN SEARCH RESULTS THAT HAVE NONE OF MY SEARCH TERMS!
      • schinckel
        "But I'm smarter than you, FunkyBob" --Google
      • NBhosting
        so from form = IdealPaymentsForm(initial=newideal) to urllib post
      • FunkyBob
        *ahem*
      • malgorath
        I think our website looks horrible but the wife wont let me change it now
      • FunkyBob
        malgorath: it's more JS magicks that I need
      • malgorath
        I actually am thinking of making one of my sites, malgorath.com or malgorath1.com a text only not alot of JS site
      • Ohmnivore
        SmileyChris: how do i step through it?
      • s?
      • limbera
        in my template i am calling model methods that return numeric values
      • NBhosting
        any easy way to convert form = IdealPaymentsForm(initial=newideal) to a list name/values
      • limbera
        is there a short hand in the template to say "if value is None - display a "--""
      • or does that logic need to happen in the model method
      • schinckel
        {{ variable|defaultnone:"--" }}
      • NBhosting
        i gues its not very common what i wanna do, but i wanna keep the form between it
      • limbera
        thank you schneider
      • schinckel
        Sorry, {{ variable|default_if_none:"--" }}
      • limbera
        schinckel: even
      • schneider
        you're welcome limbera
      • fof has quit
      • NBhosting
        something like form.list would be handy :P
      • schinckel
        NBhosting: You want validated data from that form? form.cleaned_data
      • limbera
        schinckel: turns out it's actually {{ value|default_if_none:"nothing" }}
      • NBhosting
        no i wanna post the contents of that form with urllib, so i need a list
      • limbera
        (y)
      • hillaj has quit
      • sargas joined the channel
      • schinckel
        NBhosting: Don't use urllib. Use requests.
      • And IIRC you'll want a dict for your data structure to POST anyway.