Re: 301 vs 308 in default redirect class for CommonMiddleware

2018-09-26 Thread Adam Johnson
I don't think it's worth the deprecation path to rename the old classes - it doesn't seem like there's a substantial benefit to using the different codes and getting everyone to change their imports is a lot of work to impose on the world. There must be some name for the 308 one that would work, b

Re: Model creation in autocommit mode.

2018-09-26 Thread Florian Apolloner
Jupp, that ticket at least shows that I am not the first one to stumble onto this :) Baring no objections I will at least try to fix it for the "easy" cases; seems like an easy win. On Wednesday, September 26, 2018 at 9:54:05 PM UTC+2, Tim Graham wrote: > > https://code.djangoproject.com/ticket/

Re: Model creation in autocommit mode.

2018-09-26 Thread Tim Graham
https://code.djangoproject.com/ticket/21171 looks like it should help. On Wednesday, September 26, 2018 at 2:56:34 PM UTC-4, Florian Apolloner wrote: > > Hi there, > > a fun issue came up on IRC today: Even when in autocommit mode, Django > starts a transaction when doing Model.objects.create (

Model creation in autocommit mode.

2018-09-26 Thread Florian Apolloner
Hi there, a fun issue came up on IRC today: Even when in autocommit mode, Django starts a transaction when doing Model.objects.create (https://github.com/django/django/blob/fb2964a4106b1282c4179b6fbbd0374f5be1ccac/django/db/models/base.py#L752). This makes some sense when there are parents to

django migrations on live database for large tables for postgresql

2018-09-26 Thread pavel . tyslacki
Hi, I found that django migrations don't designed for live updates on large tables for postgres, eg. index creation doesn't use concurrently or alter table operation can take ACCESS EXCLUSIVE lock for long time. Before I mostly wrote custom migrations, but after one of downtime I decided to av