Results of 1 - 2 of about 2 for styles (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
...lates/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_item' , id = id ) }} ">Item ID: {{ id }} </a...u mounted with the name="static" . <html> <head> <title>Item Details</title> <link href=" {{ url_for ( 'static' , path = '/styles.css' ) }} " rel="stylesheet"> </head> <body> <h1><a href=" {{ url_for ( 'read_item' , id = id ) }} ">Item ID: {{ id }} </a...></h1> </body> </html> In this example, it would link to a CSS file at static/styles.css with: h1 { color : green ; } And because you are using StaticFiles , that CSS file would be served automatically by yo... - 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
...ger_ui_parameters . 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>...le_fonts : html += """ <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet"> """ html += f """ <link rel="shortcut icon" href=" { redoc_favicon_url } "> <!-- ReDoc doesn't change outer page sty... - https://man.mtool.work/fastapi/0.115/how-to/configure-swagger-ui/
PREV
1
NEXT