Skip to content

How add folders to 1 exe files #7822

Answered by bwoodsend
KOKASGKASKGO125 asked this question in Help
Discussion options

You must be logged in to vote

This works for me.

from pathlib import Path

...

templates = Jinja2Templates(directory=str(Path(__file__).with_name("templates")))
app.mount('/static', StaticFiles(directory=str(Path(__file__).with_name('static')), html=True), name='static')

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
10 replies
@bwoodsend
Comment options

@KOKASGKASKGO125
Comment options

@bwoodsend
Comment options

@bwoodsend
Comment options

Answer selected by KOKASGKASKGO125
@Lopou94
Comment options

@rokm
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants