#django

/

      • ehmatthes joined the channel
      • mattmcc
        jtri: Probably jquery behaving badly.
      • ycon_ joined the channel
      • evility joined the channel
      • jtri: If you want to send a list to the server, use JSON.
      • jcdesimp has quit
      • pydave6367 has quit
      • dray3 has quit
      • jtri
        mattmcc: what do you mean, us JSON, I am... no?
      • Hairy joined the channel
      • grumpi joined the channel
      • or am i including the token in the wrong way?
      • grumpi has quit
      • mattmcc
        jtri: id_queue is a list, which by default jquery will try to encode in a manner tailored for PHP/Rails.
      • jtri
        mattmcc: ok, so jquery is renaming the field, i guess
      • what about the token, is this a good way to include it?
      • mattmcc
        The docs cover the best way to get the token into a jquery ajax request. https://docs.djangoproject.com/en/1.8/ref/csrf/...
      • evility has quit
      • Xiti joined the channel
      • pydave6367 joined the channel
      • jd|2 joined the channel
      • parabolize joined the channel
      • thiago_ joined the channel
      • jtri has quit
      • thiago_ is now known as Guest94235
      • jessamynsmith joined the channel
      • geek has quit
      • dcrouch joined the channel
      • Guest94235 has quit
      • dray3 joined the channel
      • solomonix has quit
      • SecondForm_Glenn has quit
      • jessamynsmith has quit
      • dray3 has quit
      • SecondForm_Glenn joined the channel
      • brockhaywood joined the channel
      • kutenai
        quick question I hope: in development, if I change a template, I have to restart runserver. Refreshing the page won't work. Is there a common reason for that?
      • robvdl has quit
      • josuebrunel joined the channel
      • eka joined the channel
      • mattmcc
        Did you enable the caching template loader?
      • Nizumzen has quit
      • kutenai
        No
      • mattmcc
        Then no, by default Django re-reads a template file on each request.
      • kutenai
        Just have filesytem.Loader and app_directories.Loader
      • mattmcc
        So I would guess you're not editing the same template that the view is rendering.
      • kutenai
        No, I definitely am.
      • I do have the 'FetchFromCacheMiddleware'..
      • mattmcc
        Oh, so you're caching the whole response, not just the template.
      • kutenai
        I updated the CACHE_MIDDLEWARE_SECONDS = 1 for local.. and that fixes it..
      • mattmcc
        Why not just turn off the caching middleware when in development?
      • brockhaywood has quit
      • brockhaywood joined the channel
      • kutenai
        Is there a flag to do so, or do I have to remove it from the list..
      • mattmcc
        There are a few apps such as django-classy-settings and django-configurations to make it easy to maintain environment-specific sets of settings that extend a common base.
      • kutenai
        I'm pretty well setup along those lines I think.. I have base, dev, prod and then a local config. Local loads the dev, which loads the base.
      • patterned after Two scoops of Django.
      • merricat_ has left the channel
      • parabolize has quit
      • I could add the cache middleware in prod I guess..
      • ASonOfGod joined the channel
      • Just wondering if there was a flag, or if I set CACHES to the dummy cache...
      • parabolize joined the channel
      • mattmcc
        Using the dummy cache would certainly work too.
      • kutenai
        Okay, that's what I did.. better solution.
      • Thanks
      • mattmcc
        And would probably cover your bases better for local development, since it'd nullify all caching effects, not just those middleware classes.
      • introspectr has quit
      • Genitrust joined the channel
      • eka has quit
      • nimomo joined the channel
      • Relaed joined the channel
      • kutenai
        mattmcc: Thanks for the help!! much appreciated.
      • SpoutBE joined the channel
      • badkeypoints joined the channel
      • eka joined the channel
      • badkeypoints
        Morning fellas, I've got a good problem a coworker came up with. Please check http://stackoverflow.com/questions/31682737/dja...
      • eka has quit
      • nimomo has quit
      • Quitta joined the channel
      • Basically, it's about common table expressions in psql that he wants to get done using Django's ORM, in an efficient manner, if possible
      • mattmcc
        The ORM doesn't know anything about CTEs. If your query returns a result set that is suitable for populating a model, you can use raw()
      • SecondForm_Glenn has quit
      • eka joined the channel
      • eka has quit
      • linkedinyou joined the channel
      • Quitta has quit
      • jd|2 has quit
      • pkulas joined the channel
      • brockhaywood has quit
      • hell_razer joined the channel
      • jarshwah joined the channel
      • spirals has quit
      • badkeypoints
        mattmcc: So basically, this is something that should be done in SQL only, and it's no use trying to waste time to do it somehow in Python? Right?
      • mattmcc
        Well, remember, the ORM's primary role isn't to be a comprehensive replacement for writing SQL. Some things really are best done there.
      • badkeypoints
        Thank you
      • mattmcc
        This is especially true in Postgres, which has an immense set of capabilities not exposed by the ORM.
      • zz_theskumar is now known as theskumar
      • Ivo joined the channel
      • SteenJobs has quit
      • jarshwah has quit
      • jiang42 joined the channel
      • Alina-malina has quit
      • jiang42 has quit
      • johnkevinmbasco has quit
      • johnkevinmbasco joined the channel
      • Hairy has quit
      • Tyris has quit
      • SteenJobs joined the channel
      • Hairy joined the channel
      • hyperair joined the channel
      • kushal has quit
      • ubunturos joined the channel
      • ubunturos
        What has usually been the max size of a Sqlitedb that a Django app will happily use in someone's experience here in this group?
      • schinckel
        ubunturos: sqlite is not that great for more than light testing. IIRC, it doesn't cope well with multiple concurrent access.
      • (for instance)
      • crazy_rudy_ joined the channel
      • ubunturos
        schinckel: Yes, I am aware of that. I'm just curious to know what's the tipping point that people may have observed here.
      • Quitta joined the channel
      • schinckel
        kutenai: Some people are strong supporters of having differences in configuration all handled by environment variables, rather than stored in different files.
      • ubunturos: I've nothing to add then ;)
      • ubunturos
        schinckel: :-)
      • nimomo joined the channel
      • jarshwah joined the channel
      • michalmo joined the channel
      • spirals joined the channel
      • Quitta has quit
      • nimomo has quit
      • josuebrunel has quit
      • darylantony joined the channel
      • josuebrunel joined the channel
      • mitaka joined the channel
      • Saturn812 joined the channel
      • josuebrunel has quit
      • mattmcc
        ubunturos: Since it's an in-memory DB, it'd be a question of your available resources.
      • ubunturos
        mattmcc: okay.
      • xterm joined the channel
      • jas02 joined the channel
      • Genitrust has quit
      • mattmcc
        Of course, for any sort of nontrivial data, in a web app environment, I'm not sure it has any advantages over Postgres.
      • BlindHunter joined the channel
      • theskumar is now known as zz_theskumar
      • Relaed has quit
      • schinckel
        Even in development I'm not sure of any advantages over PG. It's pretty easy to run PG on your local machine now. (Even for windows?)
      • mattmcc
        I dunno, is there a Windows-alike for Postgres.app?
      • shangxiao joined the channel
      • Hairy has quit
      • Nizumzen joined the channel
      • sashav joined the channel