changed folder for static
Browse files
main.py
CHANGED
|
@@ -27,9 +27,8 @@ import arel
|
|
| 27 |
async def reload_data():
|
| 28 |
print("Reloading server data...")
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
template_path = str(BASE_PATH / "templates")
|
| 33 |
|
| 34 |
hotreload = arel.HotReload(
|
| 35 |
paths=[
|
|
@@ -48,7 +47,6 @@ app = FastAPI(
|
|
| 48 |
|
| 49 |
# templates
|
| 50 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
| 51 |
-
BASE_PATH = Path(__file__).resolve().parent
|
| 52 |
templates = Jinja2Templates(directory=template_path)
|
| 53 |
templates.env.globals["DEBUG"] = True
|
| 54 |
templates.env.globals["hotreload"] = hotreload
|
|
|
|
| 27 |
async def reload_data():
|
| 28 |
print("Reloading server data...")
|
| 29 |
|
| 30 |
+
static_path = "/static"
|
| 31 |
+
template_path = "/templates"
|
|
|
|
| 32 |
|
| 33 |
hotreload = arel.HotReload(
|
| 34 |
paths=[
|
|
|
|
| 47 |
|
| 48 |
# templates
|
| 49 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
|
|
|
| 50 |
templates = Jinja2Templates(directory=template_path)
|
| 51 |
templates.env.globals["DEBUG"] = True
|
| 52 |
templates.env.globals["hotreload"] = hotreload
|