On 04/03/2012 08:28 AM, Alex Ogier wrote: > I have written up a little bit about the alternate proposal that I made > a while ago, Solution 2a > from https://code.djangoproject.com/wiki/ContribAuthImprovements > > In addition to other arguments, there is a point-by-point breakdown of > what I feel are the weaknesses in Jacob's proposal. > > You can find it at https://gist.github.com/2289395
Since I weighed in with a +1 on the linked-profiles approach, I should say that I also find this proposal pretty compelling, and would be happy to see us go either way. After reflecting on it a bit I think on balance I prefer this proposal, for the following reasons: 1. Requires zero migration from people with existing projects who are happy with the existing contrib.auth.User model. I think this is a big plus: all the other proposals require every single installed Django codebase to perform a migration. 2. Introduces fewer new-and-different one-off concepts into Django (the data__ ORM special case, the automatic select_related special case, the automatic collection of profile fields into user.data...). This also translates into significantly less implementation work and less new code, which is another big plus - we want something that'll actually get done and not introduce a bunch of new code we need to maintain. By the way, I took the liberty of removing from the wiki page the references to models/settings circular dependencies, because AFAIK the statements made about it on the wiki page were simply incorrect. Importing settings does _not_ immediately loop through INSTALLED_APPS and load every models file (that only happens if you run a management command that performs model validation, and even then it happens only after settings are fully loaded). And "from django.db import models" itself imports settings, so if there were such a circular dependency problem, every models.py in existence would already be suffering from it. I frequently refer to settings in models.py and it does not cause a problem. If anyone can provide sample code demonstrating that this is actually a problem, feel free to correct me! Carl
signature.asc
Description: OpenPGP digital signature