Skip to content

Commit 825527d

Browse files
author
Janneke Janssen
committed
Updated docs and app settings
1 parent 41e3f75 commit 825527d

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ and returns **True** if user is allowed to see the doc. If you plan on using
3939
``lambda user: True``, then you probably should not be using this app, as
4040
staticfiles would be better suited for this task. ::
4141

42-
DOCUMENTATION_ROOT = '/path/to/docs/'
42+
DOCUMENTATION_ROOT = '/static/docs/'
4343
DOCUMENTATION_ACCESS_FUNCTION = lambda user: user.is_staff
4444

4545
Note that django-proteq-docs serves the content via x-sendfile when DEBUG

proteq_docs/app_settings.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
from django.conf import settings
22

33
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)
115
DOCUMENTATION_XSENDFILE = getattr(settings, 'DOCUMENTATION_XSENDFILE', not settings.DEBUG)

0 commit comments

Comments
 (0)