#django

/

      • FunkyBob
        s3k7i0n8: as I said before... if you want to retain state, use the session
      • bradfordtoney joined the channel
      • s3k7i0n8
        hmmmm
      • FunkyBob
        next time, explain the actual problem you want to solve FIRST, _then_ tell us what's wrong with your solution
      • s3k7i0n8
        I'll keep that in mind thanks. For now this works pretty well, when I get Sessions down better, I'll come back and enhance this
      • dangayle
        Funkybob: I'm trying to querydict.urlencode() straight from the input, no processing in between
      • s3k7i0n8
        lol
      • shohyuken
        FunkyBob: I am trying to convert the model to a key value pair and then convert to JSON, the serializer returns in a certain format and not recursively
      • bmac has quit
      • FunkyBob
        shohyuken: whose serialiser tools are you using?
      • shohyuken
        FunkyBob: Django's
      • magicflakes
        hi guys. I need advice about an implementation that goes something like this. I have a combo box for translations, when a user change a translation I would go to a view to process that. But how can I redirect the user to the same page where they requested translation change? Or maybe jquery is better doing this?
      • jalopy
        I took the poll app from the tutorial and made it an ajax call from the mysite main page. I have it working fine, as long as the javascript event handlers (like the Vote button click handler) are defined in the mysite app templates. When I try to place the javascript code in the poll template, I can't get it to render into the "ajax" window.
      • FunkyBob
        shohyuken: you probably want to look at using a 3rd party one, like django-nap or Django REST Framework
      • shohyuken
        FunkyBob: those are REST framework, which is different from what I want
      • santiissopasse has quit
      • FunkyBob
        shohyuken: yes, but they both provide Serialiser classes that you can use independantly
      • believe me, I know
      • for instance, nap also provides a CSV exporter based on its Serialiser class
      • shohyuken
        FunkyBob: I notice, django nap author :D
      • FunkyBob
        :)
      • shohyuken
        let me look through this, mind pointing me to the right url?
      • the serializer that you spoke of
      • FunkyBob
      • kanicorn
        What would you, guys, recommend for continuous integration with Django? They used Jenkins at my previous job. Back then I didn't quite understand why one would need something like this (CI), but then I came to appreciate the concept. Anyway, Jenkins just doesn't feel (and look) good enough for me.
      • santiissopasse joined the channel
      • shohyuken
        FunkyBob: is there a getting started guide? like how to actually use the serializer
      • klaut joined the channel
      • munichlinux has quit
      • robbyoconnor has quit
      • FunkyBob
      • honestemu
        FunkyBob:Got it! Thanks!
      • FunkyBob
        guess I should add more docs ...
      • loic84 has quit
      • flebel has quit
      • shohyuken
        FunkyBob: sweet thanks! the example helps!
      • gabrielo_ joined the channel
      • klaut has quit
      • honestemu has left the channel
      • Gambit- joined the channel
      • nick1
        FunkyBob i can't seem to figure out this traceback: http://dpaste.com/1530596/ i've googled and a few people suggested i need to define CELERY_IMPORTS, but I do have that defined as CELERY_IMPORTS = ("course_adder.tasks", )
      • santiissopasse has quit
      • flebel joined the channel
      • shohyuken
        FunkyBob: out of curiosity, is there a way to know whether those associations have been loaded?
      • s3k7i0n8
        postfix taking time to send out emails is that a VPS thing or the way postfix might be set up?
      • FunkyBob
        shohyuken: yes, but it requires digging
      • s3k7i0n8: could be, yes
      • shohyuken
        FunkyBob: I saw this: http://stackoverflow.com/questions/3597762/how-... I replicated it but it doesn't work
      • s3k7i0n8
        FunkyBob: which? VPS or postfix setup?
      • FunkyBob
        s3k7i0n8: either... or could be unrelated
      • s3k7i0n8: read your postfix logs
      • s3k7i0n8
        ok
      • FunkyBob
        shohyuken: yeah, well.. it's stack overflow... what did you want?
      • shohyuken: why do you want to check if it's been loaded or not?
      • shohyuken
        out of curiousity
      • it is cached somehow
      • FunkyBob
        there's a "hidden" property
      • shohyuken
        because calling it twice, doesn't yield 2 queries
      • FunkyBob
        I think
      • bender314 has quit
      • right... it loads it if it hasn't already... and 'caches' it on the instance
      • shohyuken
        yeah and I can't find any info regarding the caching part
      • LysergicDreams joined the channel
      • robbyoconnor joined the channel
      • FunkyBob
        it uses Python's descriptor protocol
      • just like using @property ...
      • at least, I think it does
      • nick1
        haha instead of from tasks import check_timetable i needed from course_adder.tasks import check_timetable
      • FunkyBob
        yah, here it is... django/db/models/fields/related/
      • related.py I mean
      • nick1
        that took me about seven hours to figure out. SOLID.
      • shohyuken
        FunkyBob: which line?
      • FunkyBob
        SingleRelatedObjectDescriptor
      • related.get_cache_name()
      • whichi is defined in django/db/models/related.py
      • [I'm looking at the git HEAD code, so it may differ from 1.6]
      • shohyuken
        FunkyBob: does it only work for SingleRelated? not many to many?
      • FunkyBob
        m2m is different
      • [diecast] has quit
      • because it's a related manager... and so a form of queryset
      • [diecast] joined the channel
      • [diecast] has quit
      • Pici has quit
      • natea has quit
      • datakid
        happy ny everyone. See you in the next one.
      • datakid has left the channel
      • aberrant joined the channel
      • robbyoconnor has quit
      • robbyoconnor joined the channel
      • munichlinux joined the channel
      • LucSaffre has quit
      • robbyoconnor has quit
      • robbyoconnor joined the channel
      • Pici joined the channel
      • gabrielo_ has quit
      • jwa has quit
      • spirals has quit
      • joker|avd has quit
      • jezdez has quit
      • steph has quit
      • jwa joined the channel
      • dangayle
        I know everyone who has ever dealt with it wants to pull their hair out, but inheriting legacy code with unicode errors is the würst
      • tmssgrdn has quit
      • scipy53 has quit
      • chaobin joined the channel
      • bmac joined the channel
      • joker|avd joined the channel
      • darkman66 joined the channel
      • tmssgrdn joined the channel
      • Come on, no one is going to laugh at my (bad) joke?
      • natea joined the channel
      • grafa has quit
      • robbyoconnor has quit
      • darkman66 has quit
      • nick1
        dangayle, ha. ha.
      • darkman66 joined the channel
      • dangayle
        thank you, goodnight
      • dangayle has quit
      • nick1
        PROGRESS IS SO REAL. STUFF IS WORKING.
      • i'm the best.
      • Goopyo_ joined the channel
      • FunkyBob
        nick1: heh
      • FunkyBob looks up "chuffed" in the dictionary : "See nick1"
      • nick1
        [chuffed] past tense of chuff.
      • [chuff] Surly.
      • been working on this since dec. 21st and my goal has been to have it running by 2014. I have 24 hours 15 mins and i think i might make it.
      • mtrythall joined the channel
      • FunkyBob
        good thing you don't live where I do :)
      • or you'd have 8h15m
      • kushal joined the channel
      • robbyoconnor joined the channel
      • jcool has quit
      • shohyuken has quit
      • whispurr joined the channel
      • whispurr
        Strange error: if I try to import a templatetag into a python module, it makes other import fail. Why?
      • LysergicDreams has quit
      • LysergicDreams joined the channel
      • magicflakes
        Is there a way to get the current url of the request in django?
      • FunkyBob
        whispurr: depends... the nature of the import failure would help determine
      • whispurr: like, for instance, the traceback
      • magicflakes: request.path ?
      • robbyoconnor has quit
      • jcool joined the channel
      • robbyoconnor joined the channel
      • jrm2k6 has quit
      • jrm2k6 joined the channel
      • klaut joined the channel
      • estebistec has quit