Re: [flask] How to dynamically generate urls for requst outside of jinja?
- James Anderson
- 2012-10-19 @ 16:39
I resolved the issue. I wanted to share in case anyone else was trying to
generate external URLs the same way. Here was my solution. I ended up
needing _external as well as to define my passed variable instead of just
appending to the base URL using a string.
my method structure is like this:
so I use this to generate my url for sending via flask-mail.
confURL = url_for('confirm_hash', confHash = confHash, _external=True)
On Thu, Oct 18, 2012 at 10:25 PM, Simon Sapin <email@example.com> wrote:
> Le 18/10/2012 23:31, James Anderson a écrit :
> > I tried storing url_for('method') in a variable, and then appending my
> > hash to it, but flask bombs out on me.
> Full traceback please.