djangog
djangog

Reputation: 47

Django FilePathField Best Practice

I've looked over the questions in SO and none can explain the proper usage of Django's FilePathField. The Django documentation about it is a little short. A web search does not yield good tutorials about it as well. To add do non uploaded files must be collected to the static directory,reside inside apps where they are used, or at the project level?

Upvotes: 1

Views: 1672

Answers (1)

navid
navid

Reputation: 566

If you want to handle uploaded files consider using FileField instead of FilePathField. FileField also stores path to the uploaded file, but it is designed to handle new file creation for uploads. FilePathField is just used to point to a path in your file system.

Upvotes: 2

Related Questions