Spaces:
Running
Running
Commit
·
b815660
1
Parent(s):
de54dfc
Edit templates
Browse files- app/config.py +1 -1
- app/main.py +3 -1
app/config.py
CHANGED
@@ -12,6 +12,6 @@ GOOGLE_REDIRECT_URI = os.environ.get("GOOGLE_REDIRECT_URI", "http://localhost:80
|
|
12 |
# For YouTube Data API. The user must consent to at least read their channel info and videos.
|
13 |
YOUTUBE_SCOPES = ["https://www.googleapis.com/auth/youtube.readonly", "https://www.googleapis.com/auth/youtube.force-ssl"]
|
14 |
|
15 |
-
templates = Jinja2Templates(directory="templates")
|
16 |
filter_instance = GamblingFilter()
|
17 |
user_moderator = YouTubeCommentModerator(gambling_filter=GamblingFilter())
|
|
|
12 |
# For YouTube Data API. The user must consent to at least read their channel info and videos.
|
13 |
YOUTUBE_SCOPES = ["https://www.googleapis.com/auth/youtube.readonly", "https://www.googleapis.com/auth/youtube.force-ssl"]
|
14 |
|
15 |
+
templates = Jinja2Templates(directory="app/templates")
|
16 |
filter_instance = GamblingFilter()
|
17 |
user_moderator = YouTubeCommentModerator(gambling_filter=GamblingFilter())
|
app/main.py
CHANGED
@@ -4,15 +4,17 @@ from fastapi.templating import Jinja2Templates
|
|
4 |
from fastapi.responses import HTMLResponse
|
5 |
from starlette.middleware.sessions import SessionMiddleware
|
6 |
from fastapi.staticfiles import StaticFiles
|
|
|
7 |
# from starlette.middleware.proxy_headers import ProxyHeadersMiddleware
|
8 |
import os
|
9 |
# BEFORE creating the FastAPI app
|
10 |
os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1"
|
11 |
# Routers
|
12 |
from app.routes import auth, youtube
|
|
|
13 |
|
14 |
# For rendering HTML templates
|
15 |
-
|
16 |
|
17 |
app = FastAPI()
|
18 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|
|
|
4 |
from fastapi.responses import HTMLResponse
|
5 |
from starlette.middleware.sessions import SessionMiddleware
|
6 |
from fastapi.staticfiles import StaticFiles
|
7 |
+
|
8 |
# from starlette.middleware.proxy_headers import ProxyHeadersMiddleware
|
9 |
import os
|
10 |
# BEFORE creating the FastAPI app
|
11 |
os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1"
|
12 |
# Routers
|
13 |
from app.routes import auth, youtube
|
14 |
+
from app.config import templates
|
15 |
|
16 |
# For rendering HTML templates
|
17 |
+
|
18 |
|
19 |
app = FastAPI()
|
20 |
app.mount("/static", StaticFiles(directory="static"), name="static")
|