Re: PostgreSQL aggregation and views through unmanaged models

2017-09-23 Thread Dylan Young
Is there any reason not to query the models on startup to determine which ones support the optimization and which do not (naively, which are proper tables and which are views, but perhaps postgresql can provide the information instead of relying on heuristics which could change in any release)?

Re: Support for database level on delete cascade 21961

2017-12-11 Thread Dylan Young
> > There's also the added burden on explaining that we can only pass one of > the two kwargs, and not use both at the same time. I think that favors > overloading a single kwarg. > I'm not clear *why* you wouldn't be able to use both at the same time? In fact, this seems like the primary be

Re: Migrations in Django 1.7 make unit testing models harder

2019-09-13 Thread Dylan Young
This is an old issue that (as far as I can see) was never resolved. My proposed solution would be a flag to the test command to automatically `makemigrations && migrate`. When this behaviour is enabled, it would also roll back any generated migrations at the end of the test run. The flag mi

Re: Migrations in Django 1.7 make unit testing models harder

2019-09-14 Thread Dylan Young
t; > Not that I know of but I did something similar on one project where I had > a management command to create a test runner and call its setup_databases() > method. That should be sufficient! > > Thanks, > > Adam > > On Fri, 13 Sep 2019 at 19:04, Dylan Young > wrote: >

Re: Migrations in Django 1.7 make unit testing models harder

2019-09-14 Thread Dylan Young
gt; deployments PostgreSQL: >> https://medium.com/braintree-product-technology/postgresql-at-scale-database-schema-changes-without-downtime-20d3749ed680 >> >> Thanks, >> >> Adam >> >> On Sat, 14 Sep 2019 at 16:09, Dylan Young >> wrote: >> >>>

Feature Request AND/OR Documentation Fix: Manager.from_queryset does not copy methods that already exist even with queryset_only=False

2017-02-26 Thread Dylan Young
Bug: This behaviour should be documented, as it means that certain methods can't be specified in the a QuerySet subclass and be expected to be copied into the corresponding Manager: ``get_queryset`` and ``all``, in particular. Docs: - Methods with a queryset_only attribute set to False are al

Django 1.8 Migrations: AlterField Migration calls default callable for ForeignKey even when no Model Instances Exist

2017-03-14 Thread Dylan Young
Steps to reproduce: Create Model Make migrations Add FK to model with a callable default that has some side effect (e.g. creating the default instance in the database) Make migrations Migrate (or run tests on clean db) Observe the side effect I couldn't find this on the Bug Tracker. Is this stil

CheckboxSelectMultiple Widget Bug

2017-06-22 Thread Dylan Young
Hey all: Just wanted to check in about a potential bug before I file it in the bug tracker; it's potentially fixed already since I'm working on Django 1.8, but I can't see any record of the bug, so wanted to see if it's come up. The CheckboxSelectMultiple widget doesn't seem to apply attrs correc