Re: newforms unique field(s)

2007-06-04 Thread [EMAIL PROTECTED]
I finally pulled this together and submitted it as a ticket: http://code.djangoproject.com/ticket/4473 -joe On May 22, 9:47 am, "Joseph Heck" <[EMAIL PROTECTED]> wrote: > I thought the same thing. :-) I'll take a whack at wringing it > together and submitting it as a patch, and you can be appall

Re: newforms unique field(s)

2007-05-22 Thread Joseph Heck
I thought the same thing. :-) I'll take a whack at wringing it together and submitting it as a patch, and you can be appalled at my slaughtering of your fine explanation. -joe On 5/21/07, simonbun <[EMAIL PROTECTED]> wrote: > > Great stuff again Malcolm. Perhaps it should be rehashed a bit and p

Re: newforms unique field(s)

2007-05-21 Thread simonbun
Great stuff again Malcolm. Perhaps it should be rehashed a bit and put in the newforms docs under 'custom validation' ? Just a thought :) regards, Simon On May 22, 12:11 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-05-21 at 14:00 -0500, Tim Chase wrote: > > > What is the "ge

Re: newforms unique field(s)

2007-05-21 Thread Malcolm Tredinnick
On Mon, 2007-05-21 at 14:00 -0500, Tim Chase wrote: > > What is the "general way" to add your own validation to forms under > > the newforms framework? > > > > Subclassing and adding in your clean_* methods? Using decorators or > > the such around existing validation? Adding your own custom Field

Re: newforms unique field(s)

2007-05-21 Thread Malcolm Tredinnick
[Apologies if this appears twice. I think Google ate my homework the first time.] On Mon, 2007-05-21 at 14:00 -0500, Tim Chase wrote: > > What is the "general way" to add your own validation to forms under > > the newforms framework? > > > > Subclassing and adding in your clean_* methods? Using

Re: newforms unique field(s)

2007-05-21 Thread Malcolm Tredinnick
On Tue, 2007-05-22 at 08:11 +1000, Malcolm Tredinnick wrote: > On Mon, 2007-05-21 at 14:00 -0500, Tim Chase wrote: > > > What is the "general way" to add your own validation to forms under > > > the newforms framework? > > > > > > Subclassing and adding in your clean_* methods? Using decorators o

Re: newforms unique field(s)

2007-05-21 Thread Matt
After looking at http://code.google.com/p/django-registration/: forms.py [...] def clean_username(self): """ Validates that the username is not already in use. """ if self.cleaned_data.get('username', None): try: user = User.objects

Re: newforms unique field(s)

2007-05-21 Thread Tim Chase
> What is the "general way" to add your own validation to forms under > the newforms framework? > > Subclassing and adding in your clean_* methods? Using decorators or > the such around existing validation? Adding your own custom Field > objects and setting their "clean" methods? My understandin

Re: newforms unique field(s)

2007-05-21 Thread Joseph Heck
What is the "general way" to add your own validation to forms under the newforms framework? Subclassing and adding in your clean_* methods? Using decorators or the such around existing validation? Adding your own custom Field objects and setting their "clean" methods? -joe On 5/21/07, Matt <[EM

newforms unique field(s)

2007-05-21 Thread Matt
I have a form that allows users to submit their name and email address for an invitation. I do not want people signing up more than once. The following code works, but it does not seem like the "Best Practice" solution. forms.py [...imports...] class RequestInvite(forms.Form): name = form