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">"Hello, world!"</span><span class="p">)</span>
</pre></div>
Release files for django-pygmentify 0.3.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-pygmentify-0.3.7.tar.gz | 52.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_pygmentify-0.3.7-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 100.0 kB
Release files / django-pygmentify-0.3.7.tar.gz
| Download URL | django-pygmentify-0.3.7.tar.gz |
|---|---|
| Size | 52.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0b705c12e488973469eb3d7587eaf3a0b0d105a0bd3f48277f1cf35ba0132af
|
|
BLAKE2b-256 checksum How to use checksums |
4d284a063ec256e2f40c399ee01d2399afa195e83632b3909075af4b6d8b1c2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / django_pygmentify-0.3.7-py2.py3-none-any.whl
| Download URL | django_pygmentify-0.3.7-py2.py3-none-any.whl |
|---|---|
| Size | 47.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
c5562728b8fa5ecc5e48514c98827562a8c10d4455f83934579487983e032467
|
|
BLAKE2b-256 checksum How to use checksums |
10e6de5d1e0649acc562a6971a3cb3b92b2b5ab164870034097fd13812a02680
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|