A django app that parse markdown to html
Project description
This django app provides some features for handling markdown in yout django based website:
template_tags for parsing Markdown code to html and cleaning it
A form field for editing markdown code and preview the html output
Installation
Dependencies
This app use misaka, a binding for hoedown that use CFFI. You may need to install some package in order to build cffi
On fedora (adapt for your on system or the version of python you xant to use)
dnf install libffi-devel python3-devel
# on fedora, you may need to install this
dnf install redhat-rpm-config
The actual installation
Just install it with pip
pip install django-ml_markdown
Usage
settings.py
Add the path to the configuration class in INSTALLED_APPS
INSTALLED_APP.append(
'ml_markdown.apps.MlMarkdownConfig'
)
you can also inherit this class for custom settings. See the documentation for details.
Use in templates
You can use one of this filters in your templates:
to_html: parse markdown code to html without cleaning it.
clean: clean html code with the white list provides as arguments or in the class used for configuration
to_cleaned_html: shortcut for| to_html | clean
Some over filter can be found in the documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file django-ml_markdown-0.1.0.tar.gz
.
File metadata
- Download URL: django-ml_markdown-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3e29064ac06a02afea301d75dc0128e44c09eb298356bc967a668977865160f |
|
MD5 | 2dfb74aaa7b4fb23506b80265c7df189 |
|
BLAKE2b-256 | d963cd2f058ed1bfc3d3cccc61839f8d123afbc988fd1039fefbcf0895dfb1aa |
File details
Details for the file django_ml_markdown-0.1.0-py3.5.egg
.
File metadata
- Download URL: django_ml_markdown-0.1.0-py3.5.egg
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db76a67654fd2958659bee30271e7fe48f8c1846e011405a522defe0456d6576 |
|
MD5 | 3ad8be5217e06f5e9dd159668298a548 |
|
BLAKE2b-256 | b4a1973332c3376fabd6c5b7d158cd292e424442ffc8d95349539deca4c89ea0 |
File details
Details for the file django_ml_markdown-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: django_ml_markdown-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23e3981ea037fb5b51ab8effb3aab913a50753f1f91db660f728b268e24e1420 |
|
MD5 | 2e34c8d29c5cf6cd91706589b6918104 |
|
BLAKE2b-256 | 21cb5150ed7294c0305226e4c003e998f6620d5f1d1d9ad3a797a3c5bf9c093f |