Results of 1 - 2 of about 2 for href (0.001 sec.)
- Templates 11228
- Templates Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can use any template engine you want with FastAPI . A common choice is Jinja2, the same one used by F
...es Then you can write a template at templates/item.html with, for example: <html> <head> <title>Item Details</title> <link href=" {{ url_for ( 'static' , path = '/styles.css' ) }} " rel="stylesheet"> </head> <body> <h1><a href=" {{ url_for ( 'read_it...te, it takes as arguments the same arguments that would be used by your path operation function . So, the section with: <a href=" {{ url_for ( 'read_item' , id = id ) }} "> ...will generate a link to the same URL that would be handled by the path ope...ration function read_item(id=id) . For example, with an ID of 42 , this would render: < a href = "/items/42" > Templates and static files You can also use url_for() inside of the template, and use it, for example, wit... - https://man.mtool.work/fastapi/0.115/advanced/templates/
- Configure Swagger UI 7485
- Configure Swagger UI Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You can configure some extra Swagger UI parameters . To configure them, pass the swagger_ui_pa
...eters . update ( swagger_ui_parameters ) html = f """ <!DOCTYPE html> <html> <head> <link type="text/css" rel="stylesheet" href=" { swagger_css_url } "> <link rel="shortcut icon" href=" { swagger_favicon_url } "> <title> { title } </title> </head> <b...utf-8"/> <meta name="viewport" content="width=device-width, initial-scale=1"> """ if with_google_fonts : html += """ <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet"> """ html += f """ <l...ink rel="shortcut icon" href=" { redoc_favicon_url } "> <!-- ReDoc doesn't change outer page styles --> <style> body {{ margin: 0; padding: 0; }} </sty... - https://man.mtool.work/fastapi/0.115/how-to/configure-swagger-ui/
PREV
1
NEXT