File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ each Python and Django series.
93
93
The following packages are optional:
94
94
95
95
* [ coreapi] [ coreapi ] (1.32.0+) - Schema generation support.
96
- * [ Markdown] [ markdown ] (2.1 .0+) - Markdown support for the browsable API.
96
+ * [ Markdown] [ markdown ] (2.6 .0+) - Markdown support for the browsable API.
97
97
* [ django-filter] [ django-filter ] (1.0.1+) - Filtering support.
98
98
* [ django-crispy-forms] [ django-crispy-forms ] - Improved HTML display for filtering.
99
99
* [ django-guardian] [ django-guardian ] (1.1.1+) - Object level permissions support.
Original file line number Diff line number Diff line change @@ -143,19 +143,12 @@ def is_guardian_installed():
143
143
View .http_method_names = View .http_method_names + ['patch' ]
144
144
145
145
146
- # Markdown is optional
146
+ # Markdown is optional (version 2.6+ required)
147
147
try :
148
148
import markdown
149
149
150
- if markdown .version <= '2.2' :
151
- HEADERID_EXT_PATH = 'headerid'
152
- LEVEL_PARAM = 'level'
153
- elif markdown .version < '2.6' :
154
- HEADERID_EXT_PATH = 'markdown.extensions.headerid'
155
- LEVEL_PARAM = 'level'
156
- else :
157
- HEADERID_EXT_PATH = 'markdown.extensions.toc'
158
- LEVEL_PARAM = 'baselevel'
150
+ HEADERID_EXT_PATH = 'markdown.extensions.toc'
151
+ LEVEL_PARAM = 'baselevel'
159
152
160
153
def apply_markdown (text ):
161
154
"""
You can’t perform that action at this time.
0 commit comments