File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ and returns **True** if user is allowed to see the doc. If you plan on using
39
39
``lambda user: True ``, then you probably should not be using this app, as
40
40
staticfiles would be better suited for this task. ::
41
41
42
- DOCUMENTATION_ROOT = '/path/to /docs/'
42
+ DOCUMENTATION_ROOT = '/static /docs/'
43
43
DOCUMENTATION_ACCESS_FUNCTION = lambda user: user.is_staff
44
44
45
45
Note that django-proteq-docs serves the content via x-sendfile when DEBUG
Original file line number Diff line number Diff line change 1
1
from django .conf import settings
2
2
3
3
DOCUMENTATION_ROOT = getattr (settings , 'DOCUMENTATION_ROOT' , '/static/docs/' )
4
- DOCUMENTATION_ACCESS_FUNCTION = getattr (settings , 'DOCUMENTATION_ACCESS_FUNCTION' , None )
5
-
6
- if not DOCUMENTATION_ROOT :
7
- raise Exception ('Please configure DOCUMENTATION_ROOT' )
8
- if not DOCUMENTATION_ACCESS_FUNCTION :
9
- raise Exception ('Please configure DOCUMENTATION_ACCESS_FUNCTION' )
10
-
4
+ DOCUMENTATION_ACCESS_FUNCTION = getattr (settings , 'DOCUMENTATION_ACCESS_FUNCTION' , lambda user : user .is_staff )
11
5
DOCUMENTATION_XSENDFILE = getattr (settings , 'DOCUMENTATION_XSENDFILE' , not settings .DEBUG )
You can’t perform that action at this time.
0 commit comments