django-utils v0.3.0 documentation

This Page

Syntax Highlighter

Contains utilities for syntax highlighting code snippets.

Note

requires the “pygments” package

djutils.utils.highlighter.highlight(data, language=None, default='python')

Simple wrapper around pygments syntax highlighter. Returns HTML.