[web2py] Absolute URL issue in PythonAnywhere when using scheduled script

2014-02-15 Thread Ykä Marjanen
I got the scheduled background script working in PA. The script is started in web2py environment with -S app and -M -R parameters. The script generates emails, which include links (e.g. registration link with UUID). I use scheme=True and host=True to generate absolute URL. This works when I

Re: [web2py] Absolute URL issue in PythonAnywhere when using scheduled script

2014-02-15 Thread Jonathan Lundell
On 15 Feb 2014, at 7:49 AM, Ykä Marjanen yka.marja...@gmail.com wrote: I got the scheduled background script working in PA. The script is started in web2py environment with -S app and -M -R parameters. The script generates emails, which include links (e.g. registration link with UUID). I

Re: [web2py] Absolute URL issue in PythonAnywhere when using scheduled script

2014-02-15 Thread Marin Pranjić
As explained here: http://www.web2py.com/books/default/chapter/29/04/the-core#Absolute-urls You should use: URL(..., scheme='http', host='www.mysite.com') Marin On Sat, Feb 15, 2014 at 4:49 PM, Ykä Marjanen yka.marja...@gmail.comwrote: I got the scheduled background script working in PA.

Re: [web2py] Absolute URL issue in PythonAnywhere when using scheduled script

2014-02-15 Thread Ykä Marjanen
Thanks Marin. I did check this, but my issue is that the same links are generated from both a website request and the internal script. The same module is used also in another domain. I wouldn't like to manually change the domain name for each application, as the scheme=True and host=True has