```
The database schema is automatically installed when the table "schema_version" does not exist and the application is started.
+
+# Usage
+
+Within the motion content markdown can be used for formatting e.g.
+* To add a line break add two lines
+* to enter a link use `[text](https//domain.tld/link)`
from flask import request
import postgresql
import filters
+from flaskext.markdown import Markdown
+from markdown.extensions import Extension
def get_db():
db = getattr(g, '_database', None)
app = Flask(__name__)
app.register_blueprint(filters.blueprint)
+class EscapeHtml(Extension):
+ def extendMarkdown(self, md, md_globals):
+ del md.preprocessors['html_block']
+ del md.inlinePatterns['html']
+
+md = Markdown(app, extensions=[EscapeHtml()])
+
# Load config
app.config.from_pyfile('config.py')
</div>
<div class="panel-body">
<textarea class="form-control" placeholder="Motion content" name="content" rows="8" cols="70"></textarea><br>
+ Editing note: Markdown is used formatting.<br>
+ To add a line break add two lines, to enter a link use [text](https//domain.tld/link)<br>
<button class="btn btn-primary" type="submit">Submit Motion</button>
</div>
</div>
{%- endif %}
</div>
<div class="panel-body">
- <p>{{motion.content}}</p>
+ <p>{{motion.content|markdown}}</p>
{%- if motion.yes or motion.no or motion.abstain %}
<p>
{%- for vote in ['yes', 'no', 'abstain'] %}