On Tue, Mar 20, 2012 at 1:17 PM, Alex Ogier <alex.og...@gmail.com> wrote: >> Would something like the following alleviate that problem? >> >> class User(models.Model): >> if settings.USE_LONG_USER_FIELDS: >> username = models.CharField(max_length=255, unique=True, ...) >> else: >> username = models.CharField(max_length=30, unique=True, ...) >> ... > > Maybe, but there's a lot more than username length that people want to > change. Adding piecemeal settings to manage all this is putting wallpaper > over gaping holes. It's not a good long-term solution. >
I have to agree, but I don't think it was intended to be a long-term solution. All the other proposals include an entire scheme for defining your own User model. But, aren't we eventually going to get the Apps re-factor (from past GSOC) anyway? Why would a scheme be implemented and released to only have another scheme which accomplishes the same thing be included within the next couple releases? Now we have two ways to configure which User model to use. Are we then going to depreciate the method introduced only a release or two before? Sure, the Apps re-factor could be abandoned for one of these other proposals, but the Apps re-factor benefits a lot more than the User model. However, if the Apps re-factor is still a go (when ready), then something like Nan's simple proposal above seems to me like a more sensible intermediate approach. Although I might suggest wrapping the entire model def in a single if statement rather than individual fields. That way, we get the immediate needs (longer email, etc) addressed with an interim solution but have only one path (Apps re-factor) to the broad solution down the road. -- ---- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.