upload file form

0 views
Skip to first unread message

Henhiskan

unread,
Feb 26, 2008, 7:07:11 AM2/26/08
to Django users
Hi Fellows,
I am working on upload file form, the idea is get the same
functionality that the admin view. After several hours, and a lot of
tries, finally works very well :D
But when I see the admin view and go to the modify I see a useful
message: " Currently: "<name of the file>" with a link, just above of
the file field.

How I can implement that in my custom view?. I suppose that I can get
that with the
form object but I can't find the field to do that.

I found in contrib django directory the file:
<django/contrib/admin/templates/widget/file.html>
that contains {{ bound_field.original_url }},
so I think that is the object that I need, or not?

BTW, I am using newforms in 0.96 and the form that I using have:
docfile = forms.Field(widget=forms.FileInput())
The object model has:
docfile = models.FileField(upload_to='docs')

thanks.-
Reply all
Reply to author
Forward
0 new messages