Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
django-pygmento is a syntax highlighter based on Pygments for django>=4.0.0
Syntax highlighter for django templates based on Pygments.
pip install django-pygmento
pygmento
to INSTALLED_APPS
in your settings file.pygmento
template tag{% load pygmento %}
head
using the pygmento_css
template tag or manually generate it as described here and add it to static files.<head>
{% pygmento_css %}
</head>
pygmento
as shown below# Single line code
{{ "print('hello')"|pygmento:"python" }}
# Multi-line code block in python
{% pygmentoblock "python" %}
class Dog:
def __init__(self, name):
self.name = name
self.tricks = [] # creates a new empty list for each dog
def add_trick(self, trick):
self.tricks.append(trick)
{% endpygmentoblock %}
# Multi-line code block in html
{% pygmentoblock "html" %}
<!DOCTYPE html>
<html>
<body>
<h1>My Heading</h1>
<p>My paragraph.</p>
</body>
</html>
{% endpygmentoblock %}
The above code will get rendered as
Styles can be set using PYGMENTO_STYLE
setting.
PYGMENTO_STYLE = "default"
See the list of available styles and how they look here.
Apoorva Pandey – apoorvapandey365@gmail.com
Distributed under the BSD license.
https://github.com/apoorvaeternity
git checkout -b feature/fooBar
)git commit -m 'Add some fooBar'
)git push origin feature/fooBar
)FAQs
django-pygmento is a syntax highlighter based on Pygments for django>=4.0.0
We found that django-pygmento demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.