On Jun 15, 4:54 am, Oleg Oltar <[email protected]> wrote:
> Hi!
>
<snip>
> <form method="post" action=".">
> {{ form.as_p }}
> <input type="submit" value="Upload" />
> </form>
>
> After trying this code in browser I am getting a text field with
> browse button, so when I chose file to upload, and finally click
> upload I am getting 404 Error.
> Not sure what I might doing wrong.
> Please help
Your problem is in the form tag. You need to put
<form method="post" action="." enctype="multipart/form-data">
as described here:
http://docs.djangoproject.com/en/dev/ref/forms/api/#binding-uploaded-files
--
DR.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---