2011-07-18 18 views
0

Djangoの管理ページで、次のような致命的なエラーメッセージが表示されます。誰が何が間違っていたかを知っていると思う?djangoの管理ページのIOError

これが役に立った場合(これは関係ない可能性があります)、イメージフィールドはすべてが壊れているかどうかを拒否しているようです。 I以下

Request Method: GET 
Request URL: http://localhost:8000/admin/cozcus/event/ 
Django Version: 1.3 
Exception Type: IOError 
Exception Value:  
(2, 'No such file or directory') 
Exception Location: /Library/Python/2.6/site-packages/django/core/files/storage.py in _open, line 159 
Python Executable: /usr/bin/python 
Python Version: 2.6.1 
Python Path:  
['/Users/morgan/Documents/programming/django/cozycuisine', 
'/Library/Python/2.6/site-packages/simplegeo-3.0.115-py2.6.egg', 
'/Library/Python/2.6/site-packages/simplejson-2.1.6-py2.6.egg', 
'/Library/Python/2.6/site-packages/ipaddr-2.1.9-py2.6.egg', 
'/Library/Python/2.6/site-packages/oauth2-1.5.170-py2.6.egg', 
'/Library/Python/2.6/site-packages/httplib2-0.7.1-py2.6.egg', 
'/Library/Python/2.6/site-packages/MySQL_python-1.2.3-py2.6-macosx-10.6-universal.egg', 
'/Library/Python/2.6/site-packages/pyfacebook-1.0a2-py2.6.egg', 
'/Library/Python/2.6/site-packages/pip-1.0.1-py2.6.egg', 
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python26.zip', 
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6', 
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-darwin', 
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac', 
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac/lib-scriptpackages', 
'/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python', 
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk', 
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-old', 
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload', 
'/Library/Python/2.6/site-packages', 
'/Library/Python/2.6/site-packages/PIL', 
'/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC', 
'/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-  unicode'] 
Server time: Mon, 18 Jul 2011 13:40:37 -0500 

私のモデルがあります:私はあなたができるとは思わない

class Event(models.Model): 
    event_key = models.CharField(max_length = 10, unique = True) 
    title = models.CharField(max_length=200) 
    date = models.DateField() 
    time = models.TimeField() 
    food_type = models.CharField(max_length = 400) 
    address = models.CharField(max_length = 200) 
    city = models.CharField(max_length = 100) 
    state = models.CharField(max_length = 50) 
    zipcode = models.IntegerField() 
    country = models.CharField(max_length = 50, blank = True) 
    host = models.ForeignKey(User, related_name = 'host') 
    guests = models.ManyToManyField(User, related_name = 'guest') 
    image = models.ImageField(height_field = 'image_height', width_field = 'image_width', upload_to =     '~/documents/programming/django/cozycuisine/media', blank = True, null = True) 
    image_height = models.IntegerField(blank = True, null = True) 
    image_width = models.IntegerField(blank = True, null = True)   

    def __unicode__(self): 
     return self.title 

`

+0

djangoが特定のファイルやディレクトリを見つけることができないようです。 ImageFieldの画像に欠けている画像がありますか? –

答えて

0

を '〜/書類/プログラミング/ジャンゴ/ cozycuisine /メディア' ~を使用し、完全な絶対パスを試して、何が起こるかを見てください。