开发者

Django user-specific files (browse, download)

I have a situation where I have a Django app where users sign up for an account. Th开发者_高级运维e users generate a bunch of Excel files each month. These files are currently simply files generated on the server and stored in the filesystem, and are not part of any model definition right now, though I could probably change that to have them defined in a model, and use together with user permissions.

The app is working as expected, but I am stuck on how to let users browse and download their own generated files, while disallowing access to other users' files.

I was looking at django-filer, but am wondering if anybody has met with this situation before?


You'll want a FileField, a FK or M2M to User or Group, and this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜