Changes between Version 2 and Version 3 of CustomFormFields
- Timestamp:
- Feb 20, 2006, 10:21:00 AM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CustomFormFields
v2 v3 36 36 This now appears to work correctly for adding but not editing. This is due to the render method getting passed the user input or a list of IDs depending on what manipulator gets called. I can modify the user's data to change it to a list of IDs but this would need doing in the view and doesn't feel 'neat' enough. 37 37 38 === Updates === 39 40 2006-02-20-16:20-ish 41 Looks like do_html2python is our friend here. In line with the [wiki:http://code.djangoproject.com/wiki/NewAdminChanges new admin documentation] we need to make sure that do_html2python is called regardless of whether there are any errors. In doing so we can get our list of IDs in a 'neat' manner. The only problem? What if we've got validation errors? Trying to convert the data fails when there are errors. Which means we can't convert. Which means that render doesn't get its nice list of IDs anymore. Stumped.