From 237b684e12823401d5719181b7d8fe1b223864b4 Mon Sep 17 00:00:00 2001 From: newton-cn Date: Tue, 23 Apr 2024 17:39:30 +0900 Subject: [PATCH] =?utf8?q?=EB=B0=B1=EC=97=94=EB=93=9C=EC=84=9C=EB=B2=84?= =?utf8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- app/main.py | 10 +++++----- app/routers/example.py | 6 +++--- runserver | 2 +- static/js/example.js | 0 templates/main/index.html | 26 -------------------------- 5 files changed, 9 insertions(+), 35 deletions(-) delete mode 100644 static/js/example.js delete mode 100644 templates/main/index.html diff --git a/app/main.py b/app/main.py index 1b5a1c4..5d38a6b 100644 --- a/app/main.py +++ b/app/main.py @@ -19,11 +19,11 @@ templates= Jinja2Templates(directory= "templates") #exam = app.include_router(example.router) app.include_router(example.router) -@app.get("/") -async def index(request: Request): - return templates.TemplateResponse( - request= request, name= "main/index.html" - ) +# @app.get("/") +# async def index(request: Request): +# return templates.TemplateResponse( +# request= request, name= "main/index.html" +# ) if __name__ == '__main__': uvicorn.run(app= "main:app", host= "0.0.0.0", port= 33001, reload= True) diff --git a/app/routers/example.py b/app/routers/example.py index 2f823b8..b5bd2c5 100644 --- a/app/routers/example.py +++ b/app/routers/example.py @@ -14,9 +14,9 @@ async def exam1(param: str): return {"msg": f"exam: {param}"} #url데이터 받아서 템플릿에 넘겨주기 -@router.get('/exam2/{param}') -async def exam2(request: Request, param: str): - return templates.TemplateResponse(request= request, name= "main/index.html", context={"param": param}) +# @router.get('/exam2/{param}') +# async def exam2(request: Request, param: str): +# return templates.TemplateResponse(request= request, name= "main/index.html", context={"param": param}) #get 데이터 받기 @router.get('/exam3') diff --git a/runserver b/runserver index acf42f6..d1e7da5 100644 --- a/runserver +++ b/runserver @@ -1,2 +1,2 @@ fuser -k 33001/tcp -nohup .venv/bin/python3.10 app/main.py nicezip.zois.kr:33001 & +nohup .venv/bin/python3.10 app/main.py back-nicezip.zois.kr:33001 & diff --git a/static/js/example.js b/static/js/example.js deleted file mode 100644 index e69de29..0000000 diff --git a/templates/main/index.html b/templates/main/index.html deleted file mode 100644 index 8f91f79..0000000 --- a/templates/main/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - schedule - - -
-

[[ title ]]

-
- - - \ No newline at end of file -- 2.43.0