Python Flask And How To Show Code In A Web Page
My web framework is Flask. I would like to create a section of a page that will show java script and html code fragments. I dont know the lingo for doing this. Are there any pyth
Solution 1:
Take a look at Prettify - Stackoverflow uses this to format code. It will format code on your page and make it look as it does here on this site.
You just include the JavaScript and CSS on your page.
<linktype="text/css" href="css/colorschemes/prettify.css" />
<script type="text/javascript" src="js/prettify/prettify.js"></script>
See the setup instructions here
Solution 2:
Have a look at pygments. It can handle a large number of formats.
Post a Comment for "Python Flask And How To Show Code In A Web Page"