On Wed, Jul 29, 2009 at 16:23, Jonas Obrist <ojiido...@gmail.com> wrote:
> > I tried to add support for an opposite of 'choices' to DB Fields (namely > CharField) but failed horribly. I still think that would be a nice > feature so I thought I'd bring this to this group. Maybe someone can > implement this. What I had in mind was an option reserved_names (or > however you want to call it) which is the opposite of 'choices', meaning > you can enter anything as long as it's not in reserver_names. Hi, I saw your question as a challenge to create a new field, and write some tests, so I made an ExcludeField :D. See: http://dpaste.com/hold/73186/ When Honza's modelvalidation is usable, that will probably be better, but you might be able to use this in the mean time. TiNo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---