Hi Roodie,

> Anyway, currently I see 2 solutions:
>
> 1. The longer way is to use the filter in the clean_ functions -
> tedious job...
> 2. Create a custom TextArea widget and implement the cleaning feature
> there
>
> I think I wills tick with option #2 but maybe I missed some
> undocumented attribute / function somewhere.

You should consider creating a custom field rather than a custom
widget. Something like:

class TinyMCEField(forms.CharField):
    def __init__(self, *args, **kwargs):
        kwargs['widget'] = kwargs.get('widget', Textarea())
        super(TinyMCEField, self).__init__(*args, **kwargs)

    def clean(self, value):
        # do your clean up of value here
        return value

-RD

--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to