#django

/

      • schinckel
        Ruzzy: Almost certainly. Have you looked into using a Makefile, or some other automation tool? Fabric is a good one.
      • rodorgas joined the channel
      • detseg has quit
      • Ruzzy
        schinckel: is it worth using an automation tool if the script is overly simple?
      • it is basically make some directories if they aren't their, chown them and chmod them, then npm install and collectstatic
      • I think...
      • there*
      • jessamynsmith joined the channel
      • lolidunno joined the channel
      • schinckel
        Maybe, maybe not. You'll probably find that you'll have other tasks that need to be executed, so having a place to store them is useful.
      • zmt00 joined the channel
      • djapo
        how do i configure the transport layer for celery from the django settings module
      • Ruzzy
        schinckel: I found makefile incomprehensible for C++ a long time ago
      • djapo
        im using the config from obj func
      • Ruzzy
        schinckel: is the pain similar for a python project?
      • schinckel: and also what makes fabric stand out
      • schinckel
        I used to use fabric, but moved to a Makefile some time ago.
      • Leeds joined the channel
      • Ruzzy
        schinckel: why the change
      • schinckel
        I needed some way of defining dependencies. And most of the fabric commands were calling shell commands, so it turned out to be simpler to move them to a Makefile.
      • ram0n has quit
      • zmt00 has quit
      • _val_ has quit
      • shangxiao joined the channel
      • zmt00 joined the channel
      • morenoh149 joined the channel
      • theWhisper_ joined the channel
      • LiftLeft has quit
      • Combined2857 joined the channel
      • Combined2857 has quit
      • audioburn has quit
      • JustASlacker has quit
      • detseg joined the channel
      • audioburn joined the channel
      • LiftLeft joined the channel
      • mp2146_ joined the channel
      • jessamynsmith has quit
      • dodobrain has quit
      • esrse joined the channel
      • zmt00 has quit
      • DeSigna has quit
      • DeSigna joined the channel
      • ebsen joined the channel
      • porfiriopaiz joined the channel
      • jessamynsmith joined the channel
      • Zeioth joined the channel
      • rodorgas has quit
      • opticdel1sion joined the channel
      • detseg has quit
      • opticdelusion has quit
      • opticdel1sion is now known as opticdelusion
      • eperzhand has quit
      • theo_moore joined the channel
      • graphene has quit
      • graphene joined the channel
      • techalchemy joined the channel
      • masaki joined the channel
      • theo_moore has quit
      • kapil___ joined the channel
      • audioburn has quit
      • ebsen joined the channel
      • masaki has quit
      • Ruzzy
        Do you guys have any thoughts on where I should put helper functions in django?
      • I have a bunch in my models.py, but they don't -belong- to any model in it. I think it's time to give them a better home
      • mattmcc
        How about helpers.py?
      • masaki joined the channel
      • piercedwater joined the channel
      • two_tired2 joined the channel
      • porfiriopaiz has quit
      • amcorreia has quit
      • Dunedan_ joined the channel
      • Ruzzy
        mattmcc: sounds good
      • at least one very highly voted SO answer says utils.py
      • Dunedan has quit
      • robotme joined the channel
      • ebsen has quit
      • aossama joined the channel
      • matsaman joined the channel
      • matsaman has left the channel
      • ram0n joined the channel
      • jahs has quit
      • pfcodes joined the channel
      • pfcodes
        querying the abstract User class returns an empty queryset in tests, but works fine from the Python console... why?
      • jessamynsmith
        pfcodes: tests do not use data from your main database
      • pfcodes
        jessamynsm: thats right, thanks!
      • ebsen joined the channel
      • jessamynsmith
        Ruzzy mattmcc whatever you want to call it that is description, I guess
      • sorry I meant descriptive
      • at different times I've had helpers.py and utils.py
      • foul_owl joined the channel
      • k0mpa has quit
      • owler joined the channel
      • catonano joined the channel
      • schinckel
        I've had both in the same project. :(
      • jessamynsmith
        schinckel: I think I have too
      • morenoh149 has quit
      • sunil_bansal joined the channel
      • ebsen has quit
      • sunil_bansal joined the channel
      • dezmaeth
        hey guys, i've been stuck for hours now on an issue with the django rest framework auth serializer, i have a custom login that checks the serializer wether is valid or not and it always returns false
      • i never get past this : https://dpaste.de/hw9y#L31
      • line 31
      • and on django 1.10 it works , but on 2.1 fails
      • i seriously been banging my head against the wall with this one
      • jessamynsmith
        dezmaeth: which version of drf?
      • dezmaeth
        jessamynsmith: 3.8.2
      • djangorestframework >= 3.8.2
      • django-rest-auth >= 0.9.Y3
      • 0.9.3
      • rest-auth
      • jessamynsmith
        so you are on the latest drf
      • dezmaeth
        yea
      • tried older version , same result
      • jessamynsmith
        that's useful info
      • dezmaeth
        credentials are fine
      • jessamynsmith
        did you debug to see where precisely it's failing?
      • in other words, why it thinks it isn't valid?
      • in theory your libs should work with django 2 :/
      • shangxiao has quit
      • dezmaeth
        jessamynsmith: it fails on the rest_auth/serializer.py @ line 28 # authenticate(email=email, password=password)
      • aossama joined the channel
      • jessamynsmith
        I wonder if there is a missing setting
      • like if it needs an authentication backend that isn't enabled, or something
      • dezmaeth
        then it fails on : user = backend.authenticate(request, **credentials)
      • jessamynsmith
        or if username/email are getting crossed somewhere
      • dezmaeth
        returns user = None
      • let me see what backend is set
      • 'allauth.account.auth_backends.AuthenticationBackend',
      • AUTHENTICATION_BACKENDS = [
      • 'django.contrib.auth.backends.ModelBackend',
      • 'allauth.account.auth_backends.AuthenticationBackend',
      • ]
      • FunkyBob
        dezmaeth: DO NOT PASTE IN HERE
      • dezmaeth
        FunkyBob: sorry
      • FunkyBob
        read the topic.... use dpaste.de
      • dezmaeth
        FunkyBob: will do
      • jessamynsmith: https://dpaste.de/88cf
      • jessamynsmith
        dezmaeth: my best suggestions are to read over release notes, see if there is any new setup required
      • dezmaeth
        jessamynsmith: ok, thanks, u mean on rest-auth newest versions?
      • jessamynsmith
        I was thinking rest-auth and rest-framework, yeah
      • also maybe try debugging into that method, see if values match what you expect, and if it's using the right backend
      • zeus1 joined the channel
      • zopsi joined the channel
      • BPL has quit
      • catonano has quit
      • |-|-| is now known as |-|-|-|
      • aossama joined the channel
      • owler
        random stupid question of the hour... what replaced removetags?
      • schinckel
        You mean striptags?