Skip to content

Has anyone gotten url_for in a Jinja2 template to return an HTTPS url when using nginx and gunicorn? #2314

Closed Answered by e-staats
e-staats asked this question in Q&A
Discussion options

You must be logged in to vote

Ope, I'm guessing the reason there are not any specific questions about this stack are because I made it more complicated than it needed to be. I don't even need to use url_for in my Jinja2 template; I can just hardcode the path to the static directory with a slash in front of it, like <script src="/static/js/compiled_js/my_js.js"></script>. I'm still not sure how to get url_for to work, but I'm going to close this because it's not necessary for my use case.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by e-staats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant