add debate as eventtype in bootstrap-devsite, and fix commonmark templatefilter a few places I missed

This commit is contained in:
Thomas Steen Rasmussen 2018-06-03 16:29:28 +02:00
parent 811b8171af
commit bff5bb292e
8 changed files with 19 additions and 8 deletions

View File

@ -57,7 +57,7 @@ Info | {{ block.super }}
</h4>
</div>
<div class="panel-body">
<p>{{ item.body|commonmark }}</p>
<p>{{ item.body|untrustedcommonmark }}</p>
</div>
</div>
{% endfor %}

View File

@ -14,5 +14,5 @@
{% endif %}
<h3>{{ news_item.title }} <small>{{ news_item.published_at|date:"Y-m-d" }}</small></h3>
</div>
{{ news_item.content|commonmark }}
{{ news_item.content|trustedcommonmark }}
{% endblock %}

View File

@ -13,7 +13,7 @@ News | {{ block.super }}
<div>
<h3><a href="{% url 'news:detail' slug=item.slug %}">{{ item.title }}</a> <small>{{ item.published_at|date:"Y-m-d" }}</small></h3>
</div>
{{ item.content|commonmark }}
{{ item.content|trustedcommonmark }}
{% if not forloop.last %}
<hr />
{% endif %}

View File

@ -17,7 +17,7 @@
<div class="panel-heading" ><span style="font-size: x-large"><span style="background-color: {{ event.event_type.color }}; border: 0; color: {% if event.event_type.light_text %}white{% else %}black{% endif %}; display: inline-block; padding: 5px;">{{ event.event_type.name }}</span> {{ event.title }}</span></div>
<div class="panel-body">
<p>
{{ event.abstract|commonmark }}
{{ event.abstract|untrustedcommonmark }}
</p>
<hr>

View File

@ -7,7 +7,7 @@
<div class="row">
<div class="col-md-12 text-container">
{{ speaker.biography|commonmark }}
{{ speaker.biography|untrustedcommonmark }}
</div>
</div>
@ -21,7 +21,7 @@
</small>
<a href="{% url 'program:event_detail' camp_slug=camp.slug slug=event.slug %}">{{ event.title }}</a>
</h3>
{{ event.abstract|commonmark }}
{{ event.abstract|untrustedcommonmark }}
<h4>Instances</h4>
<ul class="list-group">

View File

@ -13,7 +13,7 @@
<div class="col-sm-12 col-md-8">
<h2>{{ product.name }}</h2>
{{ product.description|commonmark }}
{{ product.description|untrustedcommonmark }}
</div>
<div class="col-sm-12 col-md-4">

View File

@ -8,7 +8,7 @@
{% block content %}
<div class="panel panel-default">
<div class="panel-heading"><h4>Task: {{ task.name }}</h4></div>
<div class="panel-body">{{ task.description|commonmark }}</div>
<div class="panel-body">{{ task.description|untrustedcommonmark }}</div>
<div class="panel-footer"><i>This task belongs to the <a href="{% url 'teams:detail' team_slug=task.team.slug camp_slug=task.team.camp.slug %}">{{ task.team.name }} Team</a></i></div>
</div>

View File

@ -326,6 +326,17 @@ class Command(BaseCommand):
host_title='Speaker',
)
debate = EventType.objects.create(
name='Debate',
slug='debate',
color='#F734C3',
light_text=True,
description='A panel debate with invited guests',
icon='users',
host_title='Guest',
public=True,
)
facility = EventType.objects.create(
name='Facilities',
slug='facilities',