I'm using the latest Django SVN on my MacOS X box with Python 2.4.3.  
Everything has worked so far, except for file uploads. I've got  
something like the following model:


from django.db import models

class PortfolioImage(models.Model):
        image = models.ImageField(upload_to="media/portfolio",  
height_field='height', width_field='width', core=True)
        alt = models.CharField(blank=True, maxlength=100)
        
        class Admin:
                pass

class PortfolioItem(models.Model):
        title = models.CharField(maxlength=100)

        home_image = models.ForeignKey(PortfolioImage,  
related_name="item_home_image")
        
        class Admin:
                pass


However, whenever I try to upload an image, I get the following in  
the console from the server and the admin interface pretends like the  
file has been uploaded, even though there's no file in my media  
directory.


   File "/path-to-python-egg/django/core/servers/basehttp.py", line  
273, in run
     self.finish_response()
   File "/path-to-python-egg/django/core/servers/basehttp.py", line  
312, in finish_response
     self.write(data)
   File "/path-to-python-egg/django/core/servers/basehttp.py", line  
391, in write
     self.send_headers()
   File "/path-to-python-egg/django/core/servers/basehttp.py", line  
443, in send_headers
     self.send_preamble()
   File "/path-to-python-egg/django/core/servers/basehttp.py", line  
372, in send_preamble
     self._write(
   File "/path-to-python-lib/python2.4/socket.py", line 256, in write
     self.flush()
   File "/path-to-python-lib/python2.4/socket.py", line 243, in flush
     self._sock.sendall(buffer)
error: (32, 'Broken pipe')


I'm quite positive that my settings are correct:


MEDIA_ROOT = '/Users/ttate/Desktop/fallingbull ets/media/'
MEDIA_URL = 'http://localhost:8000/media/'
ADMIN_MEDIA_PREFIX = '/media/'


media/ has 777 permissions.

Any ideas?

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