Re: Help with custom validator - please, please, please

2008-05-15 Thread Brandon Taylor
Finally - someone pointing me to more than just the documentation. Thank you! I'll give that a shot and see where it takes me - along with memorizing the documentation. I really appreciate you taking the time to respond to my question. Django is just awesome. I fell in love with Rails having done

Re: Help with custom validator - please, please, please

2008-05-15 Thread Brian Rosner
> I would highly recommend you read the newforms documentation [1] if you have > never used newforms before. Opps, forgot the link http://www.djangoproject.com/documentation/newforms/ and while I am here check out http://www.djangoproject.com/documentation/modelforms/ too. > def clean_name(se

Re: Help with custom validator - please, please, please

2008-05-15 Thread Brian Rosner
On May 14, 2008, at 5:28 PM, Brandon Taylor wrote: > > Hi everyone, Hi :) Okay, let first begin by explaining some fundamental basics about Django itself. The admin in trunk uses oldforms. To use custom validation there you would write a validator that would go in validator_list on the m

Re: Help with custom validator - please, please, please

2008-05-15 Thread Brandon Taylor
Hi Maciej, Yes, I've looked at the validator-list code before, but I don't understand how to implement it. The example code is: from django.core import validators from django import forms class ContactManipulator(forms.Manipulator): def __init__(self): self.fields = ( #

Re: Help with custom validator - please, please, please

2008-05-15 Thread Pigletto
On 15 Maj, 03:43, Brandon Taylor <[EMAIL PROTECTED]> wrote: > I saw this example in the > documentation:http://www.djangoproject.com/documentation/forms/#validators > > But where does this code live? Does this go into my models.py as a > subclass of my Model, or is it a separate file? Link you've

Re: Help with custom validator - please, please, please

2008-05-14 Thread Brandon Taylor
I saw this example in the documentation: http://www.djangoproject.com/documentation/forms/#validators But where does this code live? Does this go into my models.py as a subclass of my Model, or is it a separate file? Advice appreciated, Brandon On May 14, 6:28 pm, Brandon Taylor <[EMAIL PROTEC

Help with custom validator - please, please, please

2008-05-14 Thread Brandon Taylor
Hi everyone, I've been using Django for awhile, but haven't had to customize the admin, until now, and...I'm stuck. Since newforms-admin is supposed to be more extensible, I'm running the latest of that, and have defined a simple model: from django.db import models from django.contrib import ad