On 11/16/05, Robert Wittams <[EMAIL PROTECTED]> wrote:
> For validation, we could do something like :
>
> from django.core import meta, validate
>
> class Poll:
>   date = meta.DateTimeField()
>   question = meta.CharField(maxlength=100)
>   category = meta.ForeignKey(category)
>
>   validate.fields(date,question).unique() # -> unique together
>   validate.field(category).unique_for_month(date)

I'm not sure how this is an improvement. Putting the validator within
the field makes more sense, in my mind, and having a magic "validate"
object in the model class namespace is a bit strange. What problem
does this solve?

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

Reply via email to