Malcolm Tredinnick wrote: >I can't think of a way off the top of my head to do this with generic >views. With a manually created (old)form, you could do this by >sub-classing oldforms.TextField and putting a prepare() method in the >sub-class that does the stripping, I guess, but then you are no longer >using the generic view (which is not a bad thing). > > Yep, I've noticed prepare() method, yet I wanted to avoid coding my own views. I'm not a perfectionist, but I have a deadline ;-)
>The create/update process for newforms already exists, actually: look at >form_for_model() and form_for_instance() in newforms. They allow you to >create a form, populate it with existing data and save it back to the >model with a built-in save() method. So you only need to wrap that in a > > Yes, it looks reasonable, maybe I'll give it a try - but not at the moment, I need to hurry to deliver something working, cleanup in the next iteration, I suppose. >Either tonight or tomorrow I'll commit something like the documentation >Joe Heck wrote about the various clean methods. In the meantime, you can >read the patch in ticket #4473. Those docs look fairly reasonable. I >would have probably written the same sort of thing (:-) ). Read it now, >in all of it's unexpurgated glory, before Adrian takes his editor's blue >pencil to it and removes all the jokes and penetrating social >commentary. > > LOL :-) Thanx! BR, Przemyslaw --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---