When forms.FilePathField compiles the list of choices in its
constructor, it uses the full path name as the machine values for each
option, and just the final component for the human readable component.

This means that when rendered using the default widget, the output
includes the absolute path of the file on the server in the HTML
output. It seems clear to me that passing details of the directory
structure of the server out to the client is not a good thing to do
(not to mention an unnecessary waste of bandwidth).

I can, of course, get around this by using a custom widget to add and
remove the path component and just leave the last bit of the path (the
bit that the underlying form actually searches in, so the only bit
that is needed to differentiate different possible choices).

Seems like it should be standard behavior though. Should I raise a bug/
feature request and patch on this, or is there some good reason for
having the machine path passed out to the client?

Ian.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to