You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

django-pygments-renderer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django-pygments-renderer

Provides functionality for syntax highlighting using Pygments.


Maintainers
1

Readme

django-pygments-renderer

Provides functionality for syntax highlighting using Pygments <http://pygments.org/>_ .

.. figure:: ./example.png

Installation

django-pygments-renderer requires python 3.6 or later and Django 2.0 or later.

.. code-block:: console

$ python3 -m pip install django-pygments-renderer

https://pypi.org/project/django-pygments-renderer/

Usage

.. code-block:: python

INSTALLED_APPS += [ 'pygments_renderer', ]

.. code-block:: html

{% load i18n %} {% load pygmentize %}

{{ snippet.title}} - djangosnippets {% pygments_css %}

{{ snippet.title }} by {{ snippet.created_by.username }}

      <div class="sourcecode">
          {{ snippet.code|pygmentize:"python3" }}
      </div>

      <div>
          {{ snippet.description }}
      </div>
  </div>

Similar projects

Development

  • lint: tox -e flake8 or flake8
  • test: tox -e py37 or DJANGO_SETTINGS_MODULE=test_settings python -m django test

License

This software is licensed under the MIT License (See LICENSE <./LICENSE>_ ).

FAQs


Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc