Thanks. There are no non-field errors though. Outputting the incoming request object shows the error:
orderLineForm is invalid: <tr><th><label for="id_Tickety tick- product">Product:</label></th><td><ul class="errorlist"><li>This field is required.</li></ul><select name="Tickety tick-product" id="id_Tickety tick-product"> The 'product' is required it says, but I just set it 2 lines before... 2B On Dec 10, 6:32 pm, Tim <[EMAIL PROTECTED]> wrote: > Try adding this to your template: > > {% if form.non_field_errors %}<ul class="errorlist"> > {{form.non_field_errors.as_ul}}</ul>{% endif %} > > This will tell you form errors that aren't specific to a field. > > Tim > > On Dec 10, 8:26 am, Berco Beute <[EMAIL PROTECTED]> wrote: > > > Here's the code: > > >http://dpaste.com/97758/ > > > My modelform stays invalid although the required fields of the > > instance are set. The 'product' field is excluded from the form > > because it shouldn't be edited. When the form is posted I'm trying to > > set the product on the form instance again, but that somehow doesn't > > work out to well. > > > In line 17 the form is found to be invalid although I set the > > OrderLineForm's OrderLine instance has the required 'product' field > > set with the appropriate object (tested at line 16). I thought > > > I've successfully used this strategy in other projects but I'm at a > > loss what happens here. I'm also not sure how to debug this properly. > > > Any pointers/suggestions would be highly appreciated. > > > 2B --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---