sourcecode django tag
example:
You can pass the follow types to the ext= argument:
- file extension - e.g.: ext=".sh"
- filename - e.g.: ext="apache.conf"
- mimetype - e.g.: ext="text/x-python-doctest"
See also existing pygments lexers.
result:
{% sourcecode ext=".py" %}
print "Python is cool!"
{% endsourcecode %}
Info:
- With this method the code can contain django template tags, except the sourcecode tag :)
- You didn't see the result in "markup preview"!
more info, on PyLucid homepage: highlight source code