how can I display code as code in the browser using python django. Example
if True:
print("Hello World")
I want the above code to be displayed in the browser with different colors
how can I display code as code in the browser using python django. Example
if True:
print("Hello World")
I want the above code to be displayed in the browser with different colors
2
Answers
im not familiar with django but it some editors you use the accent key
code
You need to use some editor that allows to do that, something like ckeditor or quill
Or maybe something more minimalist (if you don’t need the editor) like pygments