No, i didn't

On 4 май, 02:37, Dan <[email protected]> wrote:
> Hi, did you find any solution to your problem?
>
> I have the same problem. The Url function should build a link over ssl
> (https) if the url contains the controller "user". e.g. /myapp/user/
> login or /myapp/user/register
>
> On Apr 12, 4:43 am, LightOfMooN <[email protected]> wrote:
>
>
>
>
>
>
>
> > The problem is because urls is relative, not absolute.
>
> > My problem is:
> > If I have https and I'm in sub1.domain.ru, I can't make 
> > urlhttps://sub2.domain.ru, because I can't catch protocol inroutes_out,
> > like ('$protocol*://domain\.ru:.* /myapp/company/index/$sub',
> > '$protocol*://$sub.domain.ru'),
>
> > On 11 апр, 23:45, Jonathan Lundell <[email protected]> wrote:
>
> > > On Apr 11, 2011, at 10:13 AM, LightOfMooN wrote:
>
> > > > Hello
> > > > I have some records in my routes.py
>
> > > > in routes_in:
> > > >    (r'.*://$sub\.domain\.ru:.* /?', r'/myapp/company/index/$sub'),
>
> > > > inroutes_out:
> > > >    ('/myapp/company/index/$sub', 'http://$sub.domain.ru'),
>
> > > > So, routes_in workds fine, butroutes_outworks only by http.
> > > > Is there a way to get protocol inroutes_out?
>
> > > Do you mean the subdomain?
>
> > > If the incoming request was for sub.domain.ru, then you want to return a 
> > > URL that's relative to the scheme & domain, and let the browser fill them 
> > > in.
>
> > > If the request was for sub.domain.ru, and you're generating a URL for 
> > > other.domain.ru, then you've got no choice but to specify the URL 
> > > explicitly.
>
> > > It's probably best not to use URL() for the cross-domain case, I think. 
> > > The parametric (new) router assumes that the URL being generated is in 
> > > the same domain as the current request. I can see how it might be 
> > > enhanced to support cross-domain URLs, but it's not trivial, and it 
> > > doesn't happen now.

Reply via email to