Re: reverse() outside HTTP-Context (SCRIPT_NAME)

2008-10-02 Thread Malcolm Tredinnick
On Thu, 2008-10-02 at 12:37 +0200, Thomas Guettler wrote: > Malcolm Tredinnick schrieb: > > To understand the problem you're trying to solve a bit better: why do > > you want it to add a (fake) script name in the non-HTTP case? > > Example: Send an email via cron that includes a link which > wa

Re: reverse() outside HTTP-Context (SCRIPT_NAME)

2008-10-02 Thread Thomas Guettler
Malcolm Tredinnick schrieb: > To understand the problem you're trying to solve a bit better: why do > you want it to add a (fake) script name in the non-HTTP case? Example: Send an email via cron that includes a link which was created with reverse(). The method which creates the link (and adds t

Re: reverse() outside HTTP-Context (SCRIPT_NAME)

2008-10-02 Thread Malcolm Tredinnick
On Thu, 2008-10-02 at 11:24 +0200, Thomas Guettler wrote: > Hi, > > if used in a view called from a http request, reverse() returns the > URL with SCRIPT_NAME (e.g. /my-wsgi-scriptalias/myview/) > > But if I call it from the shell, there is no SCRIPT_NAME since there > is no http request. > >

reverse() outside HTTP-Context (SCRIPT_NAME)

2008-10-02 Thread Thomas Guettler
Hi, if used in a view called from a http request, reverse() returns the URL with SCRIPT_NAME (e.g. /my-wsgi-scriptalias/myview/) But if I call it from the shell, there is no SCRIPT_NAME since there is no http request. But if FORCE_SCRIPT_NAME is set, I think reverse() should use it. But it only