V
V
Vladislav2014-09-21 18:36:38
Django
Vladislav, 2014-09-21 18:36:38

How to add code highlighting in Django?

Comrades, help, it is necessary that users (not from the admin panel) have the ability to add posts with code, the code needs to be highlighted, how to achieve this? If I don't turn off escaping ({{data|safe}}), then how can I make the code look "normal"?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Solovyov, 2014-09-21
@pavel_salauyou

what does it mean to highlight the code?

A
Alexey Bukin, 2014-09-22
@abukin

Well https://github.com/odeoncg/django-pygments
$ pip install git+ https://github.com/odeoncg/django-pygments

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question