#10146: Support for contrib/markdown extension_configs in settings.py
-----------------------------------+----------------------------------------
Reporter: bdejong | Owner: nobody
Status: new | Milestone: post-1.0
Component: Contrib apps | Version: SVN
Resolution: | Keywords: markdown config extensions
extension_configs
Stage: Unreviewed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
-----------------------------------+----------------------------------------
Changes (by bdejong):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Ah, saw that the restrucured text markup template used a different name
(and method of getting the config) for the config value. Changed the code
to match that example:
{{{
MARKDOWN_FILTER_SETTINGS = {'wikilink': [('base_url', '/help/'),
('end_url', '/'), ('html_class', 'wikilink')]}
}}}
Now using:
{{{
extension_configs = getattr(settings, "MARKDOWN_FILTER_SETTINGS", {})
md = markdown.Markdown(extensions=extensions,
extension_configs=extension_configs, safe_mode=safe_mode)
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/10146#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---