Update translations strings, add setting datetime and improve DC login flow
This commit is contained in:
parent
ed8723ee6b
commit
410f1b7913
11 changed files with 151 additions and 702 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import io
|
||||
import re
|
||||
import subprocess
|
||||
|
||||
from app import app
|
||||
from flask import render_template, flash, redirect, url_for, send_file, send_from_directory
|
||||
|
|
@ -216,7 +217,12 @@ def step2():
|
|||
if new_value != existing_value:
|
||||
set_setting('butterbox_logo', new_value)
|
||||
db.session.commit()
|
||||
linux_date_arg = str(form.butterbox_date.data).replace(" ", "T") + "Z"
|
||||
output = subprocess.run(["/usr/bin/date", "-s", linux_date_arg], capture_output=True, text=True)
|
||||
if output.returncode != 0:
|
||||
flash(f"Could not set date. Please set date manually.", category="error")
|
||||
return redirect(url_for('step3'))
|
||||
|
||||
if get_setting("first_setup") == "true":
|
||||
return render_template('step2.html', form=form, get_setting=get_setting)
|
||||
return redirect(url_for('admin'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue