When submitting a simple form with just a name and a file, Safari  
hangs while submitting the form. If I click the submit button again,  
it usually works on the second or third click (totally inconsistent).  
In Camino, it submits every time flawlessly. What the FiretrUCK?

Sean




Code
-------------------------------------------------------



Model
==============

class Band(models.Model):
     name = models.CharField(maxlength=255)
     photo = models.ImageField(upload_to='images/bands/image_raw',  
blank="true")
     def __str__(self):
         return self.name






View
==============

def add_band(request):
     manipulator = Band.AddManipulator();

     # Was form submitted?
     if request.POST:
         new_data = request.POST.copy()
         new_data.update(request.FILES)
         errors = manipulator.get_validation_errors(new_data)

         if not errors:
             manipulator.do_html2python(new_data)
             new_band = manipulator.save(new_data)
             return HttpResponseRedirect('/admin/schedule/list-bands')

     else:
         # Intialize form
         new_data = errors = {}

     form = forms.FormWrapper(manipulator, new_data, errors)
     return render_to_response('admin/schedule/add-band.html',  
{'form': form})




Template
==============

My template validates and is very simple, not worth posting. But  
here's the form tag:

<form enctype="multipart/form-data" method="post" action=".">





--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to