This commit is contained in:
parent
0e4781a7a5
commit
e3dd6f2a68
@ -84,10 +84,13 @@ def context_processor():
|
|||||||
|
|
||||||
settings = Settings.query.first()
|
settings = Settings.query.first()
|
||||||
if settings.background == "random":
|
if settings.background == "random":
|
||||||
settings.background = (
|
if len(os.listdir(backgrounds_images_folder)) < 1:
|
||||||
f"static/images/backgrounds/"
|
settings.background = None
|
||||||
f"{random.choice(os.listdir(backgrounds_images_folder))}"
|
else:
|
||||||
)
|
settings.background = (
|
||||||
|
f"static/images/backgrounds/"
|
||||||
|
f"{random.choice(os.listdir(backgrounds_images_folder))}"
|
||||||
|
)
|
||||||
return dict(
|
return dict(
|
||||||
test_key="test",
|
test_key="test",
|
||||||
process_js_sources=process_js_sources,
|
process_js_sources=process_js_sources,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user