Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help3403


This forum is provided to promote discussion amongst students enrolled in Agile Web Development (CITS3403).
 
Options:
RSS cloud
Jump to:

url_for() in html validator

2 of 419 articles shown, currently no other people reading this forum.
photo
From: Weiyi T.
Date: Sun 24th May 2020, 2:27pm
Actions: 
        Login-to-reply

 

Hi I used validator to check my html code. The attribute href on element <a> doesn't allow 
'{', which is needed in url_for(), like <a href='{{ url_for("index") }}'>. What should I do 
to fix this problem?

thanks

url_for() in html validator

photo
From: Timothy F.
Date: Sun 24th May 2020, 2:52pm
Actions: 
        Login-to-reply

 

"Weiyi Tian" <22*9*0*[email protected]*u*e*t*u*a*e*u*a*> wrote:

> Hi I used validator to check my html code. The attribute href on element <a> doesn't allow 
> '{', which is needed in url_for(), like <a href='{{ url_for("index") }}'>. What should I do 
> to fix this problem?
> 
> thanks

You should check the rendered html, rather than the template. (i.e. load the app, view it on 
local host, view source and cut and paste that into a validator.) 
This Page


Program written by: [email protected]
Feedback welcome
Last modified: 11:27am Sep 21 2020