Change working directory
This commit is contained in:
parent
3b653f7bdc
commit
7a9455f6fb
3 changed files with 5 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
||||||
from tools.tools import *
|
from app.tools.tools import *
|
||||||
from tools.caching import *
|
from app.tools.caching import *
|
||||||
from flask import Flask, make_response
|
from flask import Flask, make_response
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
|
@ -66,7 +66,7 @@ def horodate(cal: Calendar, prefix='') -> Calendar:
|
||||||
|
|
||||||
|
|
||||||
def background_cache() -> None:
|
def background_cache() -> None:
|
||||||
path = "config"
|
path = "app/config"
|
||||||
files = [os.path.join(path, f) for f in os.listdir(path)
|
files = [os.path.join(path, f) for f in os.listdir(path)
|
||||||
if os.path.isfile(os.path.join(path, f)) and f.endswith('.json')]
|
if os.path.isfile(os.path.join(path, f)) and f.endswith('.json')]
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ from typing import List
|
||||||
|
|
||||||
from ics import Calendar
|
from ics import Calendar
|
||||||
from pathvalidate import sanitize_filename
|
from pathvalidate import sanitize_filename
|
||||||
from tools.caching import load_cal
|
from app.tools.caching import load_cal
|
||||||
|
|
||||||
|
|
||||||
def filtering(cal: Calendar, filters: dict, field_name: str) -> Calendar:
|
def filtering(cal: Calendar, filters: dict, field_name: str) -> Calendar:
|
||||||
|
@ -312,7 +312,7 @@ def process(path: str) -> Calendar:
|
||||||
:rtype: Calendar
|
:rtype: Calendar
|
||||||
"""
|
"""
|
||||||
|
|
||||||
o = "config/" + sanitize_filename(path)
|
o = "app/config/" + sanitize_filename(path)
|
||||||
print("Try to open " + o)
|
print("Try to open " + o)
|
||||||
file = open(o, "r")
|
file = open(o, "r")
|
||||||
config = json.loads(file.read())
|
config = json.loads(file.read())
|
||||||
|
|
Loading…
Add table
Reference in a new issue