Django template tag for showing mermaid diagrams
Project description
Django Mermaid
Django template tag for showing mermaid diagrams.
Install
python -m pip install django-mermaid
Configuration
Add the django_mermaid.apps.MermaidConfig
to your INSTALLED_APPS
setting:
INSTALLED_APPS = [
..., # other apps
'django_mermaid.apps.MermaidConfig',
]
Usage
Once you have installed the app, you can use the mermaid
template tag in your templates.
{% load mermaid %}
{% mermaid "graph LR; A-->B;" %}
By default, Django Mermaid uses the 9.4.3 version of mermaid. However, if you want to use a specific version of
mermaid, you can set the MERMAID_VERSION
variable in your Django project's settings.py file.
MERMAID_VERSION = '10.0.3-alpha.1'
Make sure the version you specify is available on the mermaid CDN, and has
the mermaid.min.js
file.
Contribute
Any contribution is welcome. If you have any ideas or suggestions, feel free to open an issue or a pull request. And don't forget to add tests for your changes.
License
Copyright (C) 2023 Artyom Vancyan. MIT
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 Distribution
Hashes for django_mermaid-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70da90af72312707fb4fadea4c1a04bac0e7245486a4b2089665c0d7e2d76158 |
|
MD5 | 99e6419a6bee6899c682be7f51583215 |
|
BLAKE2b-256 | 343991f07cf048d87a8106f2d17161c7c2bb36cd939eb6454f125758cf1bf564 |