Skip to main content

Integrate Madcap Flare docs into your Django project

Project description

Simple integration tools to link to embedded Madcap Flare help


Install the Madcap Flare integration from PyPi:

pip install django-madcap-flare

and add it to your


You will also need to configure the `MADCAP_FLARE_ROOT and MADCAP_FLARE_TAGS <#configuring>`__


You can convert Madcap Flare header files into a Python dict with the get_help_mapping command:

python get_help_mapping path_to_file.h

This will output a dict on the command line that you can copy into your file.


To setup your template tags, take the output of get_help_mapping and set it to the MADCAP_FLARE_TAGS in

  'my-help-topic': '1000',
  'other-help-topic': '2000',


The MADCAP_FLARE_ROOT setting tells Django what to use for your host name and default path.

View Mixin

To inject your information into your templates, you can use the view mixin for Madcap Flare:

from django.views.generic import ListView

from madcap_flare.views import MadcapFlareMixin

from myproject.myapp.models import MyModel

class MyListView(MadcapFlareMixin, ListView):
    """Sample list view.

    help_key = 'my-help-topic'
    queryset = MyModel.objects.all()

The MadcapFlareMixin injects the help_key object into your template context.

Template Tag

The madcap_flare_help template tag outputs a Madcap Flare URL that can be linked from your templates:

{% load madcap_flare_tags %}

<p>To get more help on this feature, see our
  <a href="{% madcap_flare_help %}">documentation</a>

With the help_key set above, this will output:

<p>To get more help on this feature, see our
  <a href="">documentation</a>


To test the integration just run:

virtualenv venv
. venv/bin/activate
pip install -r requirements.txt
python develop
python tests/ test

Writing Docs for PyPI

To convert the docs to RST for PyPI:

pandoc --from=markdown --to=rst --output=README.txt

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-madcap-flare-0.0.2.tar.gz (5.2 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page