Re: Consider reopening ticket #11385

2014-01-08 Thread Marc Tamlyn
I'm a little unsure whether that argument continues to hold about users writing times and dates. I don't know of that many sites which don't use a datepicker of some description at least for dates, and even the admin has some client side help for picking times. It seems reasonable that one field

Re: Improving aggregate support (#14030)

2014-01-08 Thread Anssi Kääriäinen
On Friday, January 3, 2014 6:34:13 PM UTC+2, Josh Smeaton wrote: > > I now have all tests passing on Postgres and SQLite (See > here). > > I still haven't touched GIS, but I believe it should be as simple

Migrations and swappable models/AUTH_USER_MODEL

2014-01-08 Thread Andrew Godwin
So, the last major bug left in migrations that I'm aware of (bar the completion of the GIS backends) is dealing with swappable models - in particular, of course, AUTH_USER_MODEL. As long as you're not using any third-party apps, then everything works fine, but as soon as third-party apps with

Re: Migrations and swappable models/AUTH_USER_MODEL

2014-01-08 Thread Shai Berger
On Wednesday 08 January 2014 18:04:44 Andrew Godwin wrote: > > There are a couple of potential approaches here: > > 1) Introduce a new value that can be used as a "to" parameter on > ForeignKeys which resolves to a swapped model in its internal > string-to-model converter. I'm thinking something

Re: Migrations and swappable models/AUTH_USER_MODEL

2014-01-08 Thread Andrew Godwin
> > > Instinctively, I'm almost -1 on 2); I'm not too happy about 1) either. If a > model says it has a FK to auth.User, that shouldn't mean anything other > than > auth.User. I don't see that as cleanliness -- it's effectively > monkeypatching. > > 1b seems to me like the most reasonable option.

Re: Migrations and swappable models/AUTH_USER_MODEL

2014-01-08 Thread Marc Tamlyn
Personally, I like approach 2. It means that if we (or another 3rd party app) were to make a model swappable, then migrations which don't know about this change would continue to work. On 8 January 2014 18:00, Andrew Godwin wrote: > >> Instinctively, I'm almost -1 on 2);

Re: Migrations and swappable models/AUTH_USER_MODEL

2014-01-08 Thread Shai Berger
On Wednesday 08 January 2014 20:00:25 Andrew Godwin wrote: > > Instinctively, I'm almost -1 on 2); I'm not too happy about 1) either. If > > a model says it has a FK to auth.User, that shouldn't mean anything > > other than > > auth.User. I don't see that as cleanliness -- it's effectively > >

Re: Migrations and swappable models/AUTH_USER_MODEL

2014-01-08 Thread Raphaël Barrois
On Wed, 8 Jan 2014 20:27:54 +0200 Shai Berger wrote: > On Wednesday 08 January 2014 20:00:25 Andrew Godwin wrote: > > > Instinctively, I'm almost -1 on 2); I'm not too happy about 1) > > > either. If a model says it has a FK to auth.User, that shouldn't > > > mean anything

Re: Migrations and swappable models/AUTH_USER_MODEL

2014-01-08 Thread Andrew Godwin
> I don't see how "you need to remember that auth.User really means some > model > defined in settings" is more user friendly than "you need to remember that > __swappable__.X means that X is swappable". More so, as people already use > auth.get_user_model() -- so, you can monkeypatch *that* when

Re: Migrations and swappable models/AUTH_USER_MODEL

2014-01-08 Thread Russell Keith-Magee
On Thu, Jan 9, 2014 at 12:04 AM, Andrew Godwin wrote: > So, the last major bug left in migrations that I'm aware of (bar the > completion of the GIS backends) is dealing with swappable models - in > particular, of course, AUTH_USER_MODEL. > > As long as you're not using any