Package: help-tokens
Django app for linking to help pages with short tokens.OverviewThere are various factors that affect what help page an application should link
to:There may be a number of relevant booksThe version of the application might affect which book to displayThe application’s language might affect which book to displayThis small Django app provides a means to use “help tokens” on the application
pages, and then use those tokens, and various other settings, to determine the
actual URL to use.DocumentationHelp-tokens provides a context processor, and a redirection URL.  Configuration
is in a number of settings.SettingsHelp-tokens reads these Django settings to create URLs:HELP_TOKENS_INI_FILE: Path to a .ini file containing help token definitions.
The format of the ini file is described below.HELP_TOKENS_BOOKS: a dictionary mapping book slugs to URLs.  For example:HELP_TOKENS_BOOKS = {
    'learner': 'http://edx.readthedocs.io/projects/learner-guide',
    'course_author': 'http://edx.readthedocs.io/projects/running-a-course',
}HELP_TOKENS_VERSION: a string used as part of the final URL, to choose the
correct version of the book.  For example,“latest”.HELP_TOKENS_LANGUAGE_CODE: the language code to use as part of the book URL,
mapped through the [locales] section of the ini file.INI file formatThe .ini file pointed to by HELP_TOKENS_INI_FILE contains the definitions of
the help tokens themselves.The[pages]section defines the help tokens.  Each help token definition
consists of a book slug (defined in HELP_TOKENS_BOOKS), a colon, and a URL
path.  Thedefaulttoken is used for missing tokens.  For example:[pages]
default = learner:index.html
instructor = learner:SFD_instructor_dash_help.html
course = learner:index.html

cohortmanual = course_author:course_features/cohorts/cohort_config.html#assign-learners-to-cohorts-manually
cohortautomatic = course_author:course_features/cohorts/cohorts_overview.html#all-automated-assignmentThe[locales]section defines language codes, used with
HELP_TOKENS_LANGUAGE_CODE to determine the language portion of the URL:[locales]
default = en
en = en
en_us = enContext processorThe context processor is“help_tokens.context_processor”.  It adds a functionget_online_help_info.  Call it with a help token, and it will return a dict
with adoc_urlentry, the help URL. You can use it like this in a template:<a href="${get_online_help_info('visibility')['doc_url']}">...</a>This interface is a bit verbose, but is to maintain backward compatibility with
a previous implementation of this context processor.Redirection viewThehelp_tokens.urlsURLs define a view that redirects to a help URL. You can
include it in your app:# For redirecting to help pages.
url(r'^help_token/', include('help_tokens.urls')),Then visitinghelp_token/foobarwill redirect to the URL defined by the
“foobar” help token.LicenseThe code in this repository is licensed under the AGPL 3.0 unless otherwise
noted.  Please seeLICENSE.txtfor details.How To ContributeContributions are very welcome.Please readHow To Contributefor details.PR description template should be automatically applied if you are sending PR from GitHub interface; otherwise you
can find it it atPULL_REQUEST_TEMPLATE.mdIssue report template should be automatically applied if you are sending it from GitHub UI as well; otherwise you
can find it atISSUE_TEMPLATE.mdReporting Security IssuesPlease do not report security issues in public. Please emailsecurity@edx.org.Getting HelpHave a question about this repository, or about Open edX in general?  Please
refer to thislist of resourcesif you need any assistance.Change Log[2.3.0] - 2023-08-02Added support for Django 4.2[2.2.0] - 2022-01-20Dropped support for django2.2, 3.0, 3.1 and 3.2Added Django40 support in CI[2.1.0] - 2020-07-07Added support for django3.0, 3.1 and 3.2[2.0.0] - 2020-01-19Removed support of python3.5[1.1.0] - 2020-05-05Removed support of Django < 2.2 versionAdded support for python 3.8[1.0.3] - 2017-07-17Updated tests to support Django 1.11Updated dependency versions[1.0.2] - 2017-05-16Fixed the README.[1.0.1] - 2017-05-15First version on PyPI.[1.0.0] - 2017-05-03First release.