Skip to content

Commit 819e5c8

Browse files
committed
change working of role
1 parent 3e83667 commit 819e5c8

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

docs/doc_extensions.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,12 @@ def django_setting_role(typ, rawtext, text, lineno, inliner, options=None,
2626
def feature_flags_role(typ, rawtext, text, lineno, inliner, options=None,
2727
content=None):
2828
"""Up to date feature flags from the application."""
29-
features_dict = {}
30-
for feature in Feature.FEATURES:
31-
features_dict[feature[0].upper()] = feature[1].capitalize()
32-
dli_list = []
33-
for feature, desc in features_dict.items():
34-
term = nodes.term(text=nodes.Text(feature))
35-
definition = nodes.definition('', nodes.paragraph(text=desc))
36-
dli = nodes.definition_list_item('', term, definition)
37-
dli_list.append(dli)
38-
dl = nodes.definition_list('', *dli_list)
39-
return [dl], []
29+
all_features = Feature.FEATURES
30+
requested_feature = utils.unescape(text)
31+
for feature in all_features:
32+
if text.lower() == feature[0].lower():
33+
desc = nodes.Text(feature[1], feature[1])
34+
return [desc], []
4035

4136

4237
def setup(_):

docs/guides/feature-flags.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,20 @@ or disable one or more of these featured flags for a particular project.
1212
Available Flags
1313
---------------
1414

15-
:featureflags:`TEMP`
15+
``USE_SPHINX_LATEST``: :featureflags:`USE_SPHINX_LATEST`
16+
17+
``USE_SETUPTOOLS_LATEST``: :featureflags:`USE_SETUPTOOLS_LATEST`
18+
19+
``ALLOW_DEPRECATED_WEBHOOKS``: :featureflags:`ALLOW_DEPRECATED_WEBHOOKS`
20+
21+
``PIP_ALWAYS_UPGRADE``: :featureflags:`PIP_ALWAYS_UPGRADE`
22+
23+
``SKIP_SUBMODULES``: :featureflags:`SKIP_SUBMODULES`
24+
25+
``DONT_OVERWRITE_SPHINX_CONTEXT``: :featureflags:`DONT_OVERWRITE_SPHINX_CONTEXT`
26+
27+
``ALLOW_V2_CONFIG_FILE``: :featureflags:`ALLOW_V2_CONFIG_FILE`
28+
29+
``MKDOCS_THEME_RTD``: :featureflags:`MKDOCS_THEME_RTD`
30+
31+
``DONT_SHALLOW_CLONE``: :featureflags:`DONT_SHALLOW_CLONE`

0 commit comments

Comments
 (0)