django-pygmy
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
Metadata
Release files for django-pygmy 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-pygmy-0.1.5.tar.gz | 3.6 kB | Without provenance | Details for django-pygmy-0.1.5.tar.gz |
Release files / django-pygmy-0.1.5.tar.gz
| Download URL | django-pygmy-0.1.5.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d32a39cb80cf377d89e7a17e49b98f3daa3b8d443ccfa06946bb6bf333841ad1
|
|
BLAKE2b-256 checksum How to use checksums |
b880efcf3a44c55d3afe3df6af9bc77050a7327ded21546f41517c77213b6f6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-pygmy 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.