Initial commit.
[fsij-members-webapp.git] / files / views.py
1 from django.views.static import serve
2 from fsij.settings import LOGIN_URL
3 from django.contrib.auth.decorators import login_required, user_passes_test
4
5 @user_passes_test(lambda u: u.has_perm('files.can_access_files'), LOGIN_URL)
6 def file_access(request,path):
7     return serve(request, path, document_root='/home/fsij/django/files/', show_indexes=True)