I've seen this happen a lot as well, and not just for Django applications, but PHP and RoR ones as well. Either Safari is bugged, or it's doing something a lot of applications aren't ready to handle. I'd be inclined to the latter, because some other applications, namely Trac in my experience, have never failed to accept a file upload from Safari.

On Sep 16, 2006, at 05:49, Sean Schertell wrote:


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 django-users- [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/ group/django-users
-~----------~----~----~----~------~----~------~--~---



Jean-François Roy

--
Co-Founder of MacStorm
/dev/klog. You better pipe that through your mind.

http://www.devklog.net
http://www.macstorm.org
[EMAIL PROTECTED]

http://www.devklog.net/documents/Jean-Francois_Roy.gpgkey
Fingerprint: 06CD 6F7B 4BF0 2AC6 78B2 57A3 06BE 6CB3 0591 FA2D

Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to