I have a django model with a text field. I'm using a rich text editor (nicEdit) on the admin site to allow the client to easily enter markup into the field. I'd like to process the contents of the field and perform a few actions before anything is inserted into the database.
For example, I want to strip junk generated by MS Word, font tags, etc. I hope this part should be easy, but I'm not sure what to override or hook to get this working.
I also want to detect remotely-linked images, download a local copy to MEDIA_ROOT, and relink the img src to the local image. I'm not quite sure how to go about fetching the remote image; I thought django.Storage
might help but it looks like it's unable to fetch content from a remote URL.
Any suggestions?