#django

/

      • jakogut joined the channel
      • finster
        knbk: yep, the parent is an abstract model. thanks!
      • graphene joined the channel
      • firefox
        an abstract model doesnt get created into a table right? its just there for you to inherit from if you want to create a table of your own?
      • miknotauro has quit
      • knbk
        firefox: that's right
      • drvid
        hello all... is it possible to annotate a queryset with values from customized model methods? ie I have Team(Model) with get_jobs(self) method which returns a qs of related WorkOrder(Model) objects.. and I want to annotate counts of these querysets .... (trying to minimize db queries) ... i can post my code if it helps
      • csotelo joined the channel
      • CustomerSupport has quit
      • GinFuyou
        drvid, no, you can only use ORM tools or fallback to raw SQL
      • drvid
        thanks for confirming GinFuyou
      • GinFuyou
        Counting related objects should simple enough though
      • nix64bit joined the channel
      • csotelo joined the channel
      • andyhoang joined the channel
      • csotelo has quit
      • drvid
        should be.. its related through two M2M tables
      • just easier to write as model methods right now
      • GinFuyou
        If you dpaste your models and what you want to get from them somebody may give you a hand with query
      • Not me today though, tired
      • drvid
        np sounds fair :)
      • mvanorder_ has quit
      • vanflymen has quit
      • JustASlacker has quit
      • JustASlacker joined the channel
      • EyePulp joined the channel
      • jessamynsmith has quit
      • ticketbot has quit
      • kyern has quit
      • ticketbot joined the channel
      • jrist joined the channel
      • kyern joined the channel
      • damienxx has quit
      • idontnee_ has quit
      • mvanorder joined the channel
      • idontneedanick joined the channel
      • xliiv joined the channel
      • brainproxy joined the channel
      • cgfuh has quit
      • adsworth has quit
      • kyern has quit
      • kyern joined the channel
      • Kangermu has quit
      • adsworth joined the channel
      • felixx has quit
      • zeograd joined the channel
      • zeograd has quit
      • chrisw joined the channel
      • CAPITANOOO joined the channel
      • CtrlC has quit
      • lukebord joined the channel
      • lukebord
        Hi, I'm having some trouble deploying a Django 2.1 app to AWS EB
      • zeograd joined the channel
      • inad922 joined the channel
      • I'm trying to configure a postgresql database. In my .ebextensions/ config file I have "postgres95-devel: []" in my yum packages, and psycopg2==2.7.5 in my requirements.txt
      • customer_support joined the channel
      • however whenever I deploy I get django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value.
      • the ENGINE value is 'ENGINE': 'django.db.backends.postgresql',
      • any ideas?
      • chrisw has quit
      • GinFuyou
        that's a wrong engine I think
      • knbk
        that would be correct, it's just that it isn't the actual value being used
      • andyhoang joined the channel
      • lukebord
        what?
      • customer_support
        I've got an app deployed to a staging environment; how do I debug an issue with signals on the staging platform? E.g. see any errors that may be thrown
      • lukebord
        that's the engine specified in the 2.1 docs for postgres
      • knbk
        that value for ENGINE is correct, but you have some other misconfiguration, and it's not used
      • lukebord
        i'm not sure what you're talking about
      • GinFuyou
        Yeah, that's right, sorry, I was keeping outdated name ^_^"
      • lukebord
        wait I think I see it. I set "DATABASE" instead of "DATABASES"
      • drodger joined the channel
      • if that's the issue i'm gonna be a little upset.. been trying to figure this out for 3 hours
      • drodger has quit
      • chrisw joined the channel
      • kapil___ has quit
      • pwrentch has quit
      • lavalamp has quit
      • that was it. fml
      • aossama joined the channel
      • chrisw joined the channel
      • jrist has quit
      • shredding joined the channel
      • jrist joined the channel
      • customer_support
        lukebord: it happens to the best of us :P
      • techalchemy joined the channel
      • graphene has quit
      • graphene joined the channel
      • oneguynick has quit
      • NomadJim joined the channel
      • aussiejames has quit
      • aussiejames joined the channel
      • aussiejames has quit
      • drodger joined the channel
      • ekathva has quit
      • GraysonBriggs has quit
      • drodger has quit
      • drodger joined the channel
      • markb1 joined the channel
      • CAPITANOOO has quit
      • aussiejames joined the channel
      • aussiejames has quit
      • shredding has quit
      • daydreamm has quit
      • ciaala has quit
      • tdy joined the channel
      • jessamynsmith joined the channel
      • redrapscallion joined the channel
      • jessamynsmith has quit
      • redrapscallion
        I have a website where I want the users to have a list of privately stored notes that only they can access. I currently have a Model for my note that just holds a single TextField.
      • I want it so that when the user accesses the home page, they see their notes. Unfortunately, I don't really know any way to bind the notes to a specific user.
      • FunkyBob
        does the note model also have a foreign key to User?
      • that would be the easiest way
      • redrapscallion
        FunkyBob: ah, yes, that is the easiest solution. I'll try that out first.
      • FunkyBob queues up answers for the next few questions redrapscallion is going to ask :)
      • optiz0r has quit
      • optiz0r joined the channel
      • UncleVasya_ joined the channel
      • firefox
        is the compiler and interpreter part of the venv?
      • UncleVasya has quit
      • FunkyBob
        firefox: you mean "python"? yes
      • firefox
        so if you have 2 venvs, each has a compiler and interpreter?
      • andyhoang joined the channel
      • hop
        firefox: we usually don't refer to a compiler, but yes
      • FunkyBob
        in python we don't tend to talk about a "compiler"
      • since it's built into the interpreter
      • firefox
        what compiles the source code to byte code then
      • FunkyBob
        when you create a venv, there's a bin dir in it with a patched copy of python
      • 22:04 <+FunkyBob> since it's built into the interpreter
      • hop
        python is patched now?L
      • mvanorder has quit
      • firefox
        is there anyway to see the byte code after it gets compiled
      • hop
        firefox: the dis module
      • tdy has quit
      • firefox: if you want to learn more about the stdlib, read pmotw
      • redrapscallion
        FunkyBob: so currently, I have this : https://dpaste.de/kJrV (yes, I realize it's silly to use a ModelForm when it's only got two fields)
      • FunkyBob: but this is causing me to have a single dropdown box with the current user's name in it, which is really pointless.
      • FunkyBob
        no, it's not silly at all
      • firefox
        so processors can't read python byte code? it has to run through the interpreter first which then makes it readable to the processor?
      • hop
        firefox: it's executed on a vm
      • (for cpython)
      • (and jython and ironpython)
      • FunkyBob
      • hop
        (or whatever runs on dotnet these days)
      • redrapscallion
        FunkyBob: wait a second, it's actually showing all the users instead :(
      • FunkyBob
        redrapscallion: yes, omit the user from the form...
      • cmgurba has quit
      • firefox: no, the interpreter interprets the bytecode..
      • only tools like PyPy will compile it to actual machine code
      • firefox
        but the interpreter still makes use of the processor right?