(Captiveportal, new) add some explanation about why we link to the config.xml in this case.

We try to avoid reading directly from config.xml as much as possible, because most applications use their own config type and we rather render our data to that format.
This commit is contained in:
Ad Schellevis 2015-10-18 13:41:38 +00:00
parent d385237df8
commit ff72fe0da9

View File

@ -45,7 +45,9 @@ with zipfile.ZipFile(output_data, mode='w', compression=zipfile.ZIP_DEFLATED) as
# overlay user template data
user_filenames = list()
if len(sys.argv) > 1:
# search for user template, using fileid
# Search for user template, using fileid
# In this case, we must use the config.xml to retrieve the latest content.
# When using the generated config, the user experience will be a bit odd (old content after upload)
cnf = OPNSenseConfig()
template_content = cnf.get_template(sys.argv[1])
if template_content is not None: