views:

597

answers:

1

I'm using the django-contrib package django-profiles, and everything is working great - my only issue is that I would like the form to upload a file (for an avatar), unfortunately - the form does not upload the file.

Has anyone successfully managed to get file uploads working with django-profiles? I want to avoid having to set up a seperate upload view just for the avatar?

Any help is much appreciated!

Thanks, Martin

+3  A: 

In your template add enctype="multipart/form-data" in form tag. Example:

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