thanks malcolm, that´s what I supposed. as for now, it´d be cool to refer to django/forms/__init__.py within the documentation. that might help a lot.
patrick Am 15.07.2006 um 11:33 schrieb Malcolm Tredinnick: > > Hi Patrick, > > On Sat, 2006-07-15 at 11:05 +0200, patrickk wrote: >> answering to myself: it does work with a TextField - is that >> explained somewhere? >> >> >> Am 15.07.2006 um 10:55 schrieb patrickk: >> >>> >>> Ok. I´m trying to use a Custom Manipulator now (which seems to be >>> very easy). >>> >>> But, I´m getting a strange error: >>> 'module' object has no attribute 'CharField' >>> >>> class RegistrationManipulator(forms.Manipulator): >>> def __init__(self): >>> self.fields = ( >>> forms.CharField(field_name='username', validator_list= >>> [self.isMinFiveChar]) >>> ... >>> ) >>> >>> def isMinFiveChar(self, field_data, all_data): >>> ... >>> >>> any ideas? > > One missing piece in the documentation is a list of all the available > form fields for when you are creating custom manipulators. You are > guessing that they are the same as model fields (there is a > models.CharField, bu not a forms.CharField). Unfortunately, that isn't > quite true. > > For forms, forms.TextField is rendered as <input type="text"...>, so > it's the right sort of input for something that might go into a > models.CharField eventually. > > If you want a text area, that is forms.LargeTextField (rendered as > <textarea ...>). > > If you want to know about the options these things can take, have a > quick read through django/forms/__init__.py. Search for lines starting > with the word "class" and then have a look at the __init__ methods > parameters. > > We'll get around to documenting this one day. > > Regards, > Malcolm > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---