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.
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?