jamesturk / django-markupfield

📑 a MarkupField for Django

Home Page:http://pypi.python.org/pypi/django-markupfield

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

markdown should be added as a dependency

hnykda opened this issue · comments

Hello,

in your guide is that this should be added to settings.py

import markdown
from docutils.core import publish_parts

def render_rest(markup):
    parts = publish_parts(source=markup, writer_name="html4css1")
    return parts["fragment"]

MARKUP_FIELD_TYPES = (
    ('markdown', markdown.markdown),
    ('ReST', render_rest),
)
  • you import markdown there, hence, it should be installed with pip as a dependency.

Thanks for the report but it isn't a dependency unless you add it- for flexibility none of the markup types are considered dependencies as all are optional (and not used unless found)

Understandable - sorry for that. Just a little notice on readme would be nice. Thank for you great work!