You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
483 B
25 lines
483 B
7 years ago
|
|
||
|
DATABASE_ENGINE = 'sqlite3'
|
||
|
DATABASE_NAME = 'markuptest.db'
|
||
|
|
||
|
try:
|
||
|
import markdown
|
||
|
except ImportError:
|
||
|
class markdown(object):
|
||
|
def markdown(self):
|
||
|
return ''
|
||
|
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),
|
||
|
]
|
||
|
|
||
|
INSTALLED_APPS = (
|
||
|
'markupfield.tests',
|
||
|
)
|