Web. py outputs the dollar sign in the template, web. py USD
Because web. py has defined the "$" symbol in the template, special processing is required if you want to use the dollar symbol in the template.
If you want to output the "$ name" string in the template:
Copy codeThe Code is as follows:
$ Name
Error
$ Name is regarded as a variable rather than an HTML string. To output the "$ name" string, you must write it like this:
Copy codeThe Code is as follows:
$ Name
Save and run the correct output.
Especially when using jQuery in combination, pay attention to it. For example:
Copy codeThe Code is as follows: $ ("id" ).html (" ");
To modify it:
Copy codeThe Code is as follows: $ ("id" ).html (" ");
In this way.
Because Python is a server-side language, while JS is a client-side language. The server language finally implements the following:
Copy codeThe Code is as follows:
$ ("Id" ).html (" ");
Translated:
Copy codeThe Code is as follows:
$ ("Id" ).html (" ");
Instead of jQuery, you can use the dollar symbol $ ("id.
Template used by webpy
The template language of web. py is called Templetor, which can pass the powerful functions of python to the template system.
In the reapter control, how can I remove or replace the list symbol in the Itemtemplate with an image?
I think it's your css control, or it shows you before the <li> tag by default. Check if the code repeater you have parsed is resolved to the li tag. If yes, Add li. {
List-style-type: none;
}
Try