#django

/

      • FunkyBob
        scruz: doesn't celery support periodic tasts?
      • scruz
        it does
      • tashi
        Thank you, guys :)
      • scruz
        tashi: FunkyBob meant postgresql ;)
      • FunkyBob
        indeed, I did
      • but honestly... does mysql really slow down with so few records?
      • scruz doesn't know
      • tashi
        I can also use PostgreSQL, prefer that in fact.
      • That's built-in in Django, right?
      • scruz
        yup
      • as long as you have psycopg2 installed
      • same as mysql support is 'built-in' for django and mysql-python
      • scruz wonders if django works with oursql
      • jmason has quit
      • filipemanuel has quit
      • sgambino_ joined the channel
      • sgambino has quit
      • sgambino_ is now known as sgambino
      • epicowl joined the channel
      • joshfinnie joined the channel
      • DesmondC has left the channel
      • anirudh24seven has quit
      • anirudh24seven joined the channel
      • zakdoek has quit
      • frankV joined the channel
      • Laybunz has quit
      • InvidFlower
        g'night all. Thanks for the advice :)
      • jvasallo joined the channel
      • jvasallo
        Hey everyone
      • sgambino_ joined the channel
      • Nemo7 has quit
      • sgambino has quit
      • sgambino_ is now known as sgambino
      • fish2000 joined the channel
      • Anyone have any experience authenticating with SAML? Working on implementing some authentication system atm for an application.
      • cellofellow has quit
      • Browser has quit
      • colinbits has quit
      • Browser joined the channel
      • johngilbrough
        Problem here - whenever I import a particular model (which has 18000 records and 4 ForeignKeyFields) I get hundreds of thousands of call to django's deepcopy turning this into a slug. Any help would really be great.
      • So the question is - what's it deepcopying and how do I prevent it?
      • FunkyBob
        johngilbrough: the queryset
      • phildini_ has quit
      • johngilbrough: every call on a queryset [filter, exclude, order_by, etc....] creates a new queryset
      • AIUI this has been remedied in 1.6
      • InvidFlower has quit
      • jfw has quit
      • ded joined the channel
      • grampajoe joined the channel
      • johngilbrough
        So having a field like "models.ForeignKey('History', blank=True, null=True)" is creating query sets?
      • joshfinnie has quit
      • joshfinnie joined the channel
      • ded
        with a class-based view, how should I route different URLs to methods of the same class? Should I override View.dispatch in views/generic/base.py?
      • FunkyBob
        no
      • ded: no.. the as_view method of the class yields only one view function
      • ded
        FunkyBob: it yields a view function which calls dispatch
      • tswett has quit
      • FunkyBob
        ded: which instanciates the class and then calls dispatch
      • so there's only one view
      • if you want multiple patterns to map to the same view... that's up to you
      • anyway... gotta
      • go
      • nodeless joined the channel
      • ded
        FunkyBob: it looks like it would work fine to me. I could override dispatch such that it uses different methods for the response, depending on *args, **kwargs passed it from the URL parser.
      • czpython joined the channel
      • PopNotSoda
        how do I make the custom django command ignore options passed in at command line
      • it captures all of them
      • and since I didn't define them with optparse, it says command not found
      • ded
        But, my question was whether that was the recommended way. In my case the view corresponds to a certain resource. For the client to render the resource a couple of ajax calls are necessary. It would be convenient if those ajax calls were handled by methods on the same class.
      • nkuttler
        PopNotSoda: all of them? by default there's only --help and such
      • PopNotSoda
        nkuttler: Basically I'm running a command "manage.py tool --pid"
      • nkuttler: I want the custom command to ignore the --pid
      • nkuttler: but it catches it and says "no such option"
      • tsx has quit
      • silv3r_m00n joined the channel
      • zauberpony has quit
      • nkuttler
        PopNotSoda: not sure what you mean... why do you throw random args at the command?a
      • zauberpony joined the channel
      • PopNotSoda
        nkuttler: I'm going to parse them with a non-standard parser
      • silv3r_m00n has left the channel
      • nkuttler: I want the Django custom management thing to ignore the args
      • ded
        PopNotSoda: is <tool> something you've written?
      • PopNotSoda
        ded: yep, its something I've written that I want to invoke with manage.py
      • frankV
        when using amazon s3 with boto is it possible to store a specific static file locally and not on s3? I'm having trouble with media in my admin classes
      • ded
        so you can handle all the argument processing in tool
      • joshfinnie has quit
      • PopNotSoda
        ded: right but when I pass them into the commandline the Custom Django Management catches it
      • ded: I want it to ignore the options
      • ded: so I can pass them thru to the tool
      • ded
        what do you mean "Custom Django Management" ?
      • nkuttler
        PopNotSoda: well so *do* define them with optparse..
      • ded
        PopNotSoda: are you writing a management command? I.e. is the thing you're writing define a class
      • class Command(BaseCommand)
      • PopNotSoda
        nkuttler: optparse is retarded, I tried defining with optparse but it doesn't work because I'm using argparse
      • ded
        from django.core.management.base import BaseCommand
      • nkuttler
        PopNotSoda: so use that
      • PopNotSoda
        nkuttler: they don't map 1-1
      • jezi22 has quit
      • ded has left the channel
      • Furao has quit
      • raijin has quit
      • Furao joined the channel
      • davecap has quit
      • jayant__ joined the channel
      • CmdX joined the channel
      • CmdX
        Is there some way to make it so that Django could care less what hostname is passed to it, completely bypassing ALLOWED_HOSTS?
      • gazumps joined the channel
      • and thus never return any form of error upon receiving SuspiciousOperation
      • EyePulp joined the channel
      • frankV
        i have this function http://dpaste.org/fQM9y/ how can return site so it doesn't escape the forward slashes?
      • it's an additional context_processor
      • CmdX
        Scratch that, you just set it to ['*']
      • knightshade joined the channel
      • frankV
        why would Django escape the forward slashes out of the link anyway?
      • this <a href"http://{{ site|safe }}/contact/">
      • turns into this:
      • <a href"http:\="" \="" cs-fsu-valcarce.herokuapp.com\="" contact\="" "="">
      • willy1234x1 has quit
      • sorry this is really what's in the source
      • <a href"http:\/\/cs-fsu-valcarce.herokuapp.com\/contact\/">
      • Kismet010 has quit
      • ded joined the channel
      • psjinx has quit
      • Frosh has quit
      • arbitraryuser has quit
      • xorox90 has quit
      • semente has quit
      • mbrochh has quit
      • mtlatif has quit
      • theskumar has quit
      • L42y has quit
      • digitalfiz has quit
      • octarine has quit
      • suchbeat has quit
      • seocam has quit
      • klobucar has quit
      • avelino has quit
      • DarkSector has quit
      • vivekrai has quit
      • oal has quit
      • lmm has quit
      • NimeshNeema has quit
      • tsx joined the channel
      • ded
        FunkyBob: OK I see what you meant now. To put it another way, since the view is instantatied and destroyed within each request, I may as well subclass the view class.
      • czpython has quit
      • rtnpro has quit
      • PopNotSoda has quit
      • frankV has left the channel
      • jpk has quit
      • glitch273 has quit