No errors when hitting upload. But the image doesn't appear where I have 
indicated it ought to. Put an absolute path in MEDIA_ROOT and referenced 
the same in (upload_to) param ImageField. Not sure what I am missing. 

Model:

    class FileUploadHandler(models.Model):
        title = models.CharField(max_length=100)
        file = 
models.ImageField(upload_to='/Python27/Lib/site-packages/django/bin/mideastinfo/wiki/static/')

View:

    from models import Article, Edit
    from forms import ArticleForm, EditForm
    from forms import *
    from PIL import Image
    from models import FileUploadHandler

    def image_upload(request):
        if request.method == 'POST':
            form = UploadImageForm(request.POST, request.FILES)
            if form.is_valid():
                FileUploadHandler(request.FILES['image'])
                return render_to_response('wiki/gallery.html')
        else:
            form = UploadImageForm()
        return render_to_response('wiki/gallery.html', 
RequestContext(request, {'form': form}))

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/29eff052-3181-4e0d-80fc-84fffe6ba029%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to