#django

/

      • dang`r`us
        clock's ticking :)
      • Taios has quit
      • so that means I can't use typescript right now - okay
      • xBBTx
        might be possible via a plugin
      • iraj has quit
      • with it being 'native' in later versions
      • Koterpillar joined the channel
      • but anyway, tomorrow will probably be another full day of this stuff, so I'm off to bed
      • night
      • xBBTx has quit
      • dang`r`us
        xBBTx, are you sure you're not talking about 0.19? 0.17 seems to have been released a year ago, https://github.com/systemjs/systemjs/tree/0.17.0
      • okay, night!
      • vedran_ has quit
      • intothemountains
        I'm trying to make this query using Django's ORM: https://paste.debian.net/444785/
      • bsl10 has quit
      • I managed to make the subquery in that query using the ORM
      • Is there a way I can make a raw query using an already built query as a table, as a subquery?
      • jessamynsmith has quit
      • bsl10 joined the channel
      • Heisenberg1276 joined the channel
      • dang`r`us
        not in a stable way methinks.
      • fission6 has quit
      • killvenom joined the channel
      • kriwil joined the channel
      • intothemountains
        :-(
      • Svedrin has quit
      • bsl10 has quit
      • Taios joined the channel
      • jedix__ has quit
      • bsl10 joined the channel
      • heinrich5991 has quit
      • jedix_ joined the channel
      • kuter has quit
      • frewsxcv_ has left the channel
      • Svedrin joined the channel
      • mmello has quit
      • tsujin joined the channel
      • kingarmadillo has quit
      • ensyde has quit
      • Guest94699 has quit
      • aditi_gupta has quit
      • jessamynsmith joined the channel
      • meoblast001 has quit
      • pearlus joined the channel
      • jessamynsmith has quit
      • jessamynsmith joined the channel
      • Taios has quit
      • tbaxter has quit
      • tbaxter joined the channel
      • tbaxter has quit
      • dshap joined the channel
      • XofP joined the channel
      • bsl10 has quit
      • akahn0889 has quit
      • streblo has quit
      • amcorreia has quit
      • bsl10 joined the channel
      • dshap
        Anyone see anything wrong with using hashers.make_password() to store a hashed version of someone's password as a session variable and then later use it to register/create a new User?
      • tchalla has quit
      • I have a 2-step purchase flow, with the first step being account details (username/password) and second step being billing info. I want to store the account details in the first step (but not yet register a new User with them), and then if the user comes back, I want them to be able to just skip to the billing step because I have their account details already in the session.
      • sobersabre joined the channel
      • Seems to be working fine in my early testing, but figured I'd ask here in case I'm missing something about why this is bad
      • Koterpillar
        dshap: from a UX POV, why ask for the password if not creating the user yet?
      • mattmcc
        Also, you can't assume the session data will still be there when they complete the billing step.
      • dshap
        Koterpillar: I don't actually create users until they convert i.e. finish BOTH steps
      • mattmcc
        You can just create the user in an inactive state.
      • Koterpillar
        dshap: why do you ask for the password then?
      • jessamynsmith has quit
      • dshap
        mattmcc: I plan to check if it's there, and if it's not, take them back to the first step. But if it is there, take them straight to billing as a convenience & conversion-improvement method
      • heinrich5991 joined the channel
      • mattmcc
        That seems like more work than creating the user up front and leaving it inactive.
      • dshap
        mattmcc: issue with that is, then let's say they come back on another computer/browser and want to sign up
      • mattmcc: it will say username already exists....and i don't have a good setup right now for an existing user account who hasn't added billing info yet
      • mattmcc
        Well, then they wouldn't have the same session either.
      • mlavin has quit
      • kingarmadillo joined the channel
      • You can look them up by email and continue on..
      • dshap
        right, new computer = need to fill out the form again, can use the same username they did before
      • mattmcc
        Or username, whatever you're using.
      • phinxy has quit
      • dshap
        I think I have a plan for how this will all work, UX-included, but I'm asking mainly about the tech-perspective of using hashers.make_password to store a hashed password in the session, and then attaching it to a new User later on with my_user.password instead of my_user.set_password() like I normally do on registration.
      • that *should* work..right?
      • surfnturf_
        I'm getting a column user_id not unique error. However, I'm using get_or_create. Shouldn't it get the existing object? https://dpaste.de/osd6
      • Koterpillar
        dshap: traceback
      • sorry, surfnturf_: traceback
      • thunderbolt joined the channel
      • thunderbolt
        Anyone have a preference for hosting? Is Linode still good?
      • Koterpillar
        dshap: I see no way to exploit this but that's all I can say; someone with access to that session, if you are storing it clientside, might be able to register with the same password?
      • slick666_work has quit
      • surfnturf_
      • Fuyou
        up: what I'm doing wrong if LANGUAGE_CODE is empty here: https://dpaste.de/iDjq
      • Koterpillar
        surfnturf_: the user matches but bt_customer_id does not
      • mdiarra has quit
      • dshap
        Koterpillar: hmm im not storing the actual session variables client side, but obviously there is a session ID...but if somoene got ahold of one of my users' cookies I'd be in trouble anyway :-P
      • surfnturf_
        oh ic. ok thx
      • mkoistinen joined the channel
      • where did you see that in the traceback?
      • Koterpillar
        surfnturf_: I did not; but since user matches, something else must not. The only other thing is bt_customer_id
      • surfnturf_
        ok. just trying to learn how to debug better
      • disgrntld has quit
      • Azelphur
        Hey folks, wondering if anyone has any good suggestions for this problem. I need to provide forms (as in, pen and paper rather than django) that have some fields automatically filled in. Ideally the form would be editable by end users (so think a doc, or a pdf) and use some simple templating (eg {{ user.first_name }}) any suggestions on how I could go about this?
      • mandeep joined the channel
      • Koterpillar
        Azelphur: pandoc will get you from HTML to DOC or DOCX (and PDF too but wkhtmltopdf is better here).
      • Azelphur
        Koterpillar: probly is that HTML isn't really editable by end users, so starting from HTML isn't great
      • Koterpillar
        Azelphur: so you want the users to edit the template, or the output?
      • Azelphur
        the template
      • Koterpillar
        they'll break ti
      • Azelphur
        the output they just get sent, and fill in pen and paper
      • Koterpillar
        they'll break it
      • Azelphur
        I suppose they would :)
      • slick666_work joined the channel
      • bsl10 has quit
      • Koterpillar
        advice: lock down the substitutions to simple USER_FIRST_NAME and replace that verbatim; for formatting, possibly Markdown (that can be converted by pandoc too)
      • Azelphur
        Interesting idea
      • Markdown could certainly work :)
      • Koterpillar
        they'll still break it
      • bsl10 joined the channel
      • SecondForm_Glenn has quit
      • so, you should have a preview
      • Azelphur
        indeed
      • bsl10 has quit
      • bsl10 joined the channel
      • holler has quit
      • bsl10 has quit
      • bsl10 joined the channel
      • dhmspector joined the channel
      • pywkm has quit
      • bsl10 has quit
      • dhmspector has quit
      • bsl10 joined the channel
      • lacrymology has quit
      • areca has quit
      • dhmspector joined the channel
      • bsl10 has quit
      • jgrubb joined the channel
      • gwhigs_ has quit
      • holler joined the channel
      • bsl10 joined the channel
      • bsl10 has quit
      • holler has quit
      • amcorreia joined the channel
      • bsl10 joined the channel
      • newbsie joined the channel
      • johnmilton has quit
      • robvdl joined the channel
      • newbsie
        Anyone use Pycharm? I cannot get it to switch git branches....
      • bsl10 has quit
      • jgrubb has quit
      • featheredperson has quit
      • bsl10 joined the channel