Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

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

Release History

This version
History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
django-pygmy-0.1.5.tar.gz
(3.6 kB) Copy SHA256 Hash SHA256
Source None Jun 19, 2013

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting