On 2/14/06, hugo <[EMAIL PROTECTED]> wrote: > But one thing I think about: wouldn't it be needed to have some > overrideable function to handle the data from the custom template? > Because the current code still expects the data in the same format as > it would have with the default template - so how would you solve that? > > For example the Many2Many would be a selection list, but maybe a custom > template would present it as a comma-separated list of tag names in a > textarea. So on submit, this field wouldn't be in the expected format - > could there be a nice way to "inject" custom handlers, too? Or are we > supposed to write JS hackery that produces the internal field from the > used stuff in the custom template to produce the correct format > internally in some hidden fields?
Yeah, I think you'd need to do the JS hackery to convert the custom template to the expected form widget. But also note that magic-removal makes it easier to create custom Field types, and this will (finally) be documented, so that approach can also solve your problem. Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org