FIlePathField does not update

64 views
Skip to first unread message

Kusako

unread,
Jun 26, 2009, 11:37:54 AM6/26/09
to Django users
Hi-

I have a FilePathField in a form that displays directory contents as
expected. However if I add or remove a file to/from the directory the
change is not updated in the form.
I'm probably just using FilePathField in a wrong way...

Here is the from:

from django import forms

class MyForm(forms.Form):
the_file = forms.FilePathField(path='c:/temp')

and the corresponding view:

from django.shortcuts import render_to_response, get_object_or_404
from forms import MyForm

def test(request):
form = MyForm()
return render_to_response('test.html', {'form' : form})

Any help would be apreciated,

-markus
Reply all
Reply to author
Forward
0 new messages