Responding to myself: I choosed solution 2 (parse HTML form) with the help of ClientForm: http://www.djangosnippets.org/snippets/467/
Comments welcome Am Freitag, 16. November 2007 13:03 schrieb Thomas Guettler: > Hi, > > my <form> has a lot of input widgets which are build from several > newform.form instances. > > If I want to test the form with client.post(), I need to pass all values of > the input fields in a dictionary, even if I just want to modify one value. > > It would be nice if I could get all initial values in a dictionary, in such > a way that I don't need to alter the test if a field is added to the form. > > I think about two solutions: > > 1. Alter the view method, so that it can return all forms. Then > read all initial values from the forms and fill in the post dict. > > 2. Call the view with client.get(url) first, parse the HTML and build > the post dict from the input tags. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---