Your Name %!s(int64=3) %!d(string=hai) anos
pai
achega
496cf200c0
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      step_question/apis/main.py

+ 3 - 2
step_question/apis/main.py

@@ -9,6 +9,7 @@ from fastapi.staticfiles import StaticFiles
 import io
 import io
 from starlette.responses import RedirectResponse
 from starlette.responses import RedirectResponse
 import codecs
 import codecs
+import random
 app = FastAPI()
 app = FastAPI()
 app.add_middleware(
 app.add_middleware(
     CORSMiddleware,
     CORSMiddleware,
@@ -48,9 +49,9 @@ async def submit(request: Request):
 #    fr.close()
 #    fr.close()
 #    response = RedirectResponse(url='/a1/index_complete.html')
 #    response = RedirectResponse(url='/a1/index_complete.html')
     lines="""<html><body>
     lines="""<html><body>
-    <script>    window.location.href = "/a1/index_complete.html"; </script>
+    <script>    window.location.href = "/a1/index_complete.html?par={0}"; </script>
     </body></html>"""
     </body></html>"""
-    return HTMLResponse(content=lines, status_code=200)
+    return HTMLResponse(content=lines.format(str(random.randint(100000,999999))), status_code=200)
 
 
 #    return result
 #    return result