Re: cherrypy + jinja2 html template question: a href tag cannot go correct web page

Stephan Semerad <[email protected]> Tue, 6 Jun 2017 13:53:15 -0700 (PDT)
Newsgroups gmane.comp.python.cherrypy
Message-ID <[email protected]>
the IP 127.0.0.1 is your Localhost...  with this you can view on your 
browser your site once the server started. 

I am using mako for templating, but I guess jinja is a bit similar. 

if your link is set to "/xxxx" which I presumme is your link variable
then once its pressed you will be redirected 127.0.0.1/xxxx


On Friday, October 23, 2015 at 7:41:48 PM UTC+2, Tim Roberts wrote:
>
> 闫旭 wrote: 
> > Hello, i m a newbie of cherrypy 
> > 
> > i have a jinja2 html template: 
> > 
> > <li><ahref="{{ link }}">{{ descript}}</a></li> 
> > 
> > when i run the server the link is like: 127.0.0.1/XXXXXXX 
> > 
> > how can i get rid of the 127.0.0.1 ? 
> > 
>
> This is not a CherryPy question, it is a Jinja2 question.  You need to 
> ask the Jinja2 list. 
>
> However, assuming you were running this on your local system, 
> http://127.0.0.1/XXXXXXX is entirely correct as an absolute URL.  If you 
> want the url to be relative instead of absolute, then you need to fix 
> the "link" variable before you pass it to Jinja. 
>
> -- 
> Tim Roberts, [email protected] <javascript:> 
> Providenza & Boekelheide, Inc. 
>
>

-- 
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.