mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +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
|
data_dir = /var/lib/plinth
|
||||||
log_dir = /var/log/plinth
|
log_dir = /var/log/plinth
|
||||||
pid_dir = /var/run
|
pid_dir = /var/run
|
||||||
actions_dir = /usr/share/plinth/actions
|
|
||||||
server_dir = plinth/
|
server_dir = plinth/
|
||||||
|
actions_dir = /usr/share/plinth/actions
|
||||||
|
doc_dir = /usr/share/doc/plinth
|
||||||
|
|
||||||
# file locations
|
# file locations
|
||||||
store_file = %(data_dir)s/store.sqlite3
|
store_file = %(data_dir)s/store.sqlite3
|
||||||
|
|||||||
@ -13,6 +13,7 @@ data_dir = None
|
|||||||
store_file = None
|
store_file = None
|
||||||
user_db = None
|
user_db = None
|
||||||
actions_dir = None
|
actions_dir = None
|
||||||
|
doc_dir = None
|
||||||
status_log_file = None
|
status_log_file = None
|
||||||
access_log_file = None
|
access_log_file = None
|
||||||
pidfile = None
|
pidfile = None
|
||||||
@ -44,6 +45,7 @@ def read():
|
|||||||
('Path', 'store_file'),
|
('Path', 'store_file'),
|
||||||
('Path', 'user_db'),
|
('Path', 'user_db'),
|
||||||
('Path', 'actions_dir'),
|
('Path', 'actions_dir'),
|
||||||
|
('Path', 'doc_dir'),
|
||||||
('Path', 'status_log_file'),
|
('Path', 'status_log_file'),
|
||||||
('Path', 'access_log_file'),
|
('Path', 'access_log_file'),
|
||||||
('Path', 'pidfile'),
|
('Path', 'pidfile'),
|
||||||
|
|||||||
@ -36,7 +36,7 @@ def about(request):
|
|||||||
def helppage(request, page):
|
def helppage(request, page):
|
||||||
"""Serve a help page from the 'doc' directory"""
|
"""Serve a help page from the 'doc' directory"""
|
||||||
try:
|
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:
|
as input_file:
|
||||||
main = input_file.read()
|
main = input_file.read()
|
||||||
except IOError:
|
except IOError:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user