Re: Custom constraints on User fields

2012-02-13 Thread Shawn Milochik
It's probably related to the 80/20 rule. No tool or framework is going to be 100% what you need. Use it for the 80%. When your needs can't be handled by the tool, you can choose to twist yourself into a pretzel within the constraints of the tool or break free and do it the "manual" way -- usual

Re: Custom constraints on User fields

2012-02-13 Thread Nicolas Bazire
On Feb 13, 9:27 pm, Shawn Milochik wrote: > On 02/13/2012 03:25 PM, Nicolas Bazire wrote: > > > On Feb 13, 9:16 pm, Shawn Milochik  wrote: > >> You can override and customize the forms, then manually add the unique > >> indexes to your database. > > > Overriding the forms is only part of the probl

Re: Custom constraints on User fields

2012-02-13 Thread Shawn Milochik
On 02/13/2012 03:25 PM, Nicolas Bazire wrote: On Feb 13, 9:16 pm, Shawn Milochik wrote: You can override and customize the forms, then manually add the unique indexes to your database. Overriding the forms is only part of the problem. For instance, forms are not used with Model.objects.create

Re: Custom constraints on User fields

2012-02-13 Thread Nicolas Bazire
On Feb 13, 9:16 pm, Shawn Milochik wrote: > You can override and customize the forms, then manually add the unique > indexes to your database. Overriding the forms is only part of the problem. For instance, forms are not used with Model.objects.create(). I want to enforce such constraints and not

Re: Custom constraints on User fields

2012-02-13 Thread Shawn Milochik
You can override and customize the forms, then manually add the unique indexes to your database. Django doesn't provide much index functionality and adding indexes to your database manually may be required for something like this or performance. Whenever possible update the related code with