UNKNOWN
Project description
django-pygmy is a little app that colorizes source codez in your Django templates.
It uses pygments for prettify the codez.
Installation
To install django-pygmy, simply run:
pip install django-pygmy
Then add the app to your INSTALLED_APPS:
INSTALLED_APPS = ( ..., 'django_pygmy', )
Usage
Render the awesomeness in your template:
{% load pygmy %} {% pygmy object.code %}
It also takes the same options as HtmlFormatter class:
{% pygmy object.code nowrap='True' linenos='table' %}
Lexers
By default django-pygmy tries to guess which lexer to use based on the provided code.
If you wish you can define any lexer of Pygments lexers like so:
{% pygmy object.code lexer='python' %}
Dependencies
Python 2.6 - 3.3
Django 1.3 - 1.5
pygments >= 1.6
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-pygmy-0.1.5.tar.gz
(3.6 kB
view details)
File details
Details for the file django-pygmy-0.1.5.tar.gz
.
File metadata
- Download URL: django-pygmy-0.1.5.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d32a39cb80cf377d89e7a17e49b98f3daa3b8d443ccfa06946bb6bf333841ad1 |
|
MD5 | 9f78844d44a8c355dd9ed8f9d83d162c |
|
BLAKE2b-256 | b880efcf3a44c55d3afe3df6af9bc77050a7327ded21546f41517c77213b6f6c |