Hi, I am getting MultiValueDictKeyError -> Exception Value: "Key 'attach' not found in <MultiValueDict: {}>"
I have made filefield as required false but in the form when attach field is empty I am getting above error.. but when all the fields are filled its work fine. Can someone help me out why I am getting the error?? My view function: if request.method == 'POST': emailform = EmailForm(request.POST, request.FILES ) if emailform.is_valid(): subject = emailform.cleaned_data['subject'] message = emailform.cleaned_data['message'] attach = request.FILES['attach'] ........................................... Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---