On Mon, 2008-12-22 at 17:20 -0600, GaRaGeD Style wrote: > > That particular value comes from one of three sources. In order of > > highest priority to lowest, they are: > > > > (1) Data submitted to the form (for redisplaying submitted data > > for errors). > > (2) Initial data provided to the form class > > (3) Initial data provided to the field class (when it was > > created as part of the form). > > > > The code does a semi-complex dance to pull out the right value and it's > > not something you can really emulate at the template level. That's > > something worth adding for Django 1.1. > > > So, ther is no way to access (1) data ?? I'm doing an app with > django/dojo, and I need to display fields manually, I could make them > programatically, but that would be "a lot more work", the problem I > have now is that when the user submits data with errors, I cannot > redisplay the fields with values, so there is no way to degrade > gracefully (I'm not that interested on that actually, but could be > nice).
Have a look in django/forms/forms.py at the class BoundField. That is the object that is a "field" in the template. You can see there how the data value is retrieved by the code. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---