mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-02-25 08:43:36 +00:00
Make the help module read documentation directory from config
This commit is contained in:
parent
5ed58d6632
commit
33f8015835
@ -8,8 +8,9 @@ file_root = /usr/share/plinth/static
|
||||
data_dir = /var/lib/plinth
|
||||
log_dir = /var/log/plinth
|
||||
pid_dir = /var/run
|
||||
actions_dir = /usr/share/plinth/actions
|
||||
server_dir = plinth/
|
||||
actions_dir = /usr/share/plinth/actions
|
||||
doc_dir = /usr/share/doc/plinth
|
||||
|
||||
# file locations
|
||||
store_file = %(data_dir)s/store.sqlite3
|
||||
|
||||
@ -13,6 +13,7 @@ data_dir = None
|
||||
store_file = None
|
||||
user_db = None
|
||||
actions_dir = None
|
||||
doc_dir = None
|
||||
status_log_file = None
|
||||
access_log_file = None
|
||||
pidfile = None
|
||||
@ -44,6 +45,7 @@ def read():
|
||||
('Path', 'store_file'),
|
||||
('Path', 'user_db'),
|
||||
('Path', 'actions_dir'),
|
||||
('Path', 'doc_dir'),
|
||||
('Path', 'status_log_file'),
|
||||
('Path', 'access_log_file'),
|
||||
('Path', 'pidfile'),
|
||||
|
||||
@ -36,7 +36,7 @@ def about(request):
|
||||
def helppage(request, page):
|
||||
"""Serve a help page from the 'doc' directory"""
|
||||
try:
|
||||
with open(os.path.join('doc', '%s.part.html' % page), 'r') \
|
||||
with open(os.path.join(cfg.doc_dir, '%s.part.html' % page), 'r') \
|
||||
as input_file:
|
||||
main = input_file.read()
|
||||
except IOError:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user