#django

/

      • FunkyBob
        hyp3rkyd: yeah, I hear you.... I'm just trying to gague what you know, what you have ,etc...
      • hyp3rkyd
        FunkyBob: I've read that mod-wsgi should be the easiest and simplest to do
      • FunkyBob
        it's certainly the preferred approach with Apache
      • hyp3rkyd
        is it being used in production ?
      • FunkyBob
        absolutely!
      • gyx1000 joined the channel
      • hyp3rkyd
        FunkyBob: that's nice to know
      • FunkyBob: I hope there won't be a problem running php and django projects at the same time
      • rhymes joined the channel
      • not that I have a problem ...because they are testing projects
      • but just want to know
      • FunkyBob
        hyp3rkyd: I've heard there can be an issue because some people compile mysql into their mod_php
      • but I may be confused...
      • and I never use PHP, or MySQL.. so it was never an issue for me
      • hyp3rkyd
        FunkyBob: thanks for the info... I'll start experimenting with mod-wsgi right away..
      • ThomasC joined the channel
      • FunkyBob: next thing I'll try is nginx
      • asp123 joined the channel
      • terrykfwong joined the channel
      • for both languages... I have been reading only positive feedback and a lot of performance increase
      • ksikka has quit
      • juanriaza has quit
      • plfiorini joined the channel
      • ashkan has quit
      • batisteo joined the channel
      • esauro joined the channel
      • bradfordtoney has quit
      • sayan has quit
      • booze2go joined the channel
      • elbaschid has quit
      • robmorrissey has quit
      • lunanoko has quit
      • mascot66991 joined the channel
      • mascot66991
        hi!
      • eraldo joined the channel
      • I have a little doubt
      • I know we can use humanize in template views
      • is there any way to use it in views.py
      • ?
      • apollo13
        sure, just import it an use it
      • FunkyBob
        it's all just Python
      • jaitaiwa_ joined the channel
      • mascot66991
        actually i thought that was django template special
      • thanks guys
      • )
      • mattmcc
        Template filters are just Python functions with a little extra decoration.
      • hirokiky joined the channel
      • Template tags are another matter.
      • mascot66991
        okay
      • codeitloadit joined the channel
      • viwal_ joined the channel
      • eraldo has quit
      • pilgo has quit
      • Narsilou has quit
      • zingysaturn joined the channel
      • voidus joined the channel
      • voidus is now known as void
      • mascot66991 has quit
      • amaudy joined the channel
      • mascot66991 joined the channel
      • krisd has quit
      • what should i import in views to get intcomma function
      • i tried from django.contrib.humanize import *
      • zingysaturn has left the channel
      • matason joined the channel
      • asp123 has quit
      • apollo13
        git grep "def intcomma"
      • django/contrib/humanize/templatetags/humanize.py:def intcomma(value, use_l10n=True)
      • star imports are bad
      • archayl has quit
      • mascot66991
        I am a windows user so no grep for me
      • P
      • thanks
      • inad922 joined the channel
      • tapia joined the channel
      • apollo13
        mascot66991: haha, get a proper environment…
      • kaakku joined the channel
      • tapia
        Hi! A signals related question: If I have a foreign key in my model A, pointing to the model B, will the A "post_delete" signal be launched when a B object is deleted?
      • i.e. will the signals follow the cascade delete?
      • omarek
        Does CSS have a way to display text vertically ? (rotated 90 degrees)
      • apollo13
        tapia: probably, but just try?
      • Zac12 joined the channel
      • Zac12
        when serializing a object such as 'albums' that has a nested related field with a many to many relationship with 'songs' i need to prefetch all of song's details in order to avoid hitting the db multiple times, I do this here: https://dpaste.de/1mcQ
      • omarek
        I think it does. Then how do I select such text ?
      • Zac12
        anyone know of a better way? as you can see, it can get pretty big and monotonous and i don't know if it's the right way that i am doing it
      • greg_f joined the channel
      • tapia
        apollo13: I've tried, and it's not happening, but maybe I'm doing something wrong
      • ashkan joined the channel
      • grandfatha joined the channel
      • apollo13: the B post_delete is executed, but the A's one isn't
      • apollo13
        tapia: sounds odd
      • tapia
        (and I'm positively sure that an A object is removed from the DB)
      • loic84 joined the channel
      • apollo13
        actually, depending on how django deletes them, it might be that it issues a signle query for all the A and doesn't issue any signals
      • would have to check the code for that
      • keimlink has quit
      • benoitbb joined the channel
      • kezabelle
        I expect it'd happen in minimal queries via a Collector, which probably means it wouldn't fire signals
      • sayan joined the channel
      • apollo13
        kezabelle: yeah, but then again the collector also issues an __in query to delete iirc :þ
      • mascot66991 has quit
      • keimlink joined the channel
      • Natsu- joined the channel
      • jaitaiwa_ has quit
      • terrykfwong has quit
      • leptone has quit
      • krisd joined the channel
      • tapia
        apollo13, kezabelle: no, I was wrong. It is correctly called. I had a typo in my code :-)
      • thank you :-)
      • krisd has quit
      • krisd joined the channel
      • krisd has quit
      • jarshwah has quit
      • robmorrissey joined the channel
      • krisd joined the channel
      • Tyris has quit
      • ineedarobot joined the channel
      • Tyris joined the channel
      • ekke85 joined the channel
      • Stierlitz joined the channel
      • Tatsh has quit
      • codeitloadit has quit
      • Tatsh joined the channel
      • Lauxley joined the channel
      • andrkavr joined the channel
      • Tyriss joined the channel
      • Tyris has quit
      • Sweetman has quit
      • robmorrissey has quit
      • apollo13
        tapia: good to know
      • Zac12
        anyone maybe got some advice for me?
      • regarding my earlier question? ^^
      • Lauxley has quit
      • apollo13
        Zac12: I'd probably do something like https://dpaste.de/LyRG
      • robmorrissey joined the channel
      • Zac12
        clever, that'll make it a bit more readable
      • krisd has quit
      • calvinx joined the channel
      • and you can re-use it if you need to prefetch all relations on songs again at a later stage
      • krisd joined the channel
      • Tyris joined the channel
      • but is that the best and only way to do it? isn't there anyway to just specify that i wanna get back all related fields on songs for the album itself?
      • Tyriss has quit
      • aarose joined the channel
      • apollo13
        Zac12: no, cause that's generally a bad idea imo
      • eg imagine you change the table and everything now includes an extra join which you might not want
      • lunanoko joined the channel
      • that's also why select_related() [sic] is deprecated
      • nlh has quit
      • hell_razer joined the channel