Skip to main content

PyPI version Build status

https://raw.githubusercontent.com/richardcornish/django-pygmentify/master/docs/_static/img/screenshot.png

Django Pygmentify is a Django template tag application to highlight code with Pygments.

It is an alternative to Django Pygments, which hasn’t been updated in several years.

Install

$ pip install django-pygmentify

Add to settings.py.

INSTALLED_APPS = [
    # ...
    'pygmentify',
]

Usage

{% load pygmentify_tags %}

<link rel="stylesheet" href="{% pygmentify_css %}">

{% pygmentify %}
<pre class="python">
print('Hello, world!')
</pre>
{% endpygmentify %}

Result:

<link rel="stylesheet" href="/static/pygmentify/css/default.min.css">

<div class="highlight"><pre class="python"><span></span><span class="k">print</span><span class="p">(</span><span class="s2">&quot;Hello, world!&quot;</span><span class="p">)</span>
</pre></div>

Download files

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

Source Distribution

django-pygmentify-0.3.7.tar.gz (52.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_pygmentify-0.3.7-py2.py3-none-any.whl (47.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file django-pygmentify-0.3.7.tar.gz.

File metadata

  • Download URL: django-pygmentify-0.3.7.tar.gz
  • Upload date:
  • Size: 52.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15

File hashes

Hashes for django-pygmentify-0.3.7.tar.gz
Algorithm Hash digest
SHA256 b0b705c12e488973469eb3d7587eaf3a0b0d105a0bd3f48277f1cf35ba0132af
MD5 6eaf8d2592281403273ab195d04f2d6f
BLAKE2b-256 4d284a063ec256e2f40c399ee01d2399afa195e83632b3909075af4b6d8b1c2c

See more details on using hashes here.

File details

Details for the file django_pygmentify-0.3.7-py2.py3-none-any.whl.

File metadata

  • Download URL: django_pygmentify-0.3.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 47.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.15

File hashes

Hashes for django_pygmentify-0.3.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c5562728b8fa5ecc5e48514c98827562a8c10d4455f83934579487983e032467
MD5 7b9489eea167ca26c4e040d852914bd7
BLAKE2b-256 10e6de5d1e0649acc562a6971a3cb3b92b2b5ab164870034097fd13812a02680

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.7 This release

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

1 file

0.3.3

1 file

0.3.2

1 file

0.3.1

1 file

0.3.0

1 file

0.2.4

1 file

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.2

1 file

0.1

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page