Commit 06aad0b1 authored by Sébastiaan's avatar Sébastiaan
Browse files

Fix feature equivalence regarding HTML in events descriptions

parent 6db64f0c
# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-10-23 22:29
from __future__ import unicode_literals
from django.db import migrations
import tinymce.models
class Migration(migrations.Migration):
dependencies = [
('events', '0008_auto_20161022_1142'),
]
operations = [
migrations.AlterField(
model_name='event',
name='description_en',
field=tinymce.models.HTMLField(verbose_name='description (EN)'),
),
migrations.AlterField(
model_name='event',
name='description_nl',
field=tinymce.models.HTMLField(verbose_name='description (NL)'),
),
]
......@@ -6,6 +6,7 @@ from django.urls import reverse
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import string_concat
from tinymce.models import HTMLField
from utils.translation import ModelTranslateMeta, MultilingualField
......@@ -29,7 +30,7 @@ class Event(models.Model, metaclass=ModelTranslateMeta):
)
description = MultilingualField(
models.TextField,
HTMLField,
_("description")
)
......
......@@ -10,7 +10,7 @@
<div class="circle-inner">{{ event.start.day }}<span>{{ event.start|date:"M" }}</span></div>
</div>
<div class="post-excerpt">
<p>{{ event.description }}</p>
<p>{{ event.description|striptags|safe }}</p>
</div>
</div>
</div>
......
......@@ -5,7 +5,7 @@
{% block body %}
<h1>{{ event.title }}</h1>
<p class="tcenter">{{ event.description }}</p>
<p class="tcenter">{{ event.description|safe }}</p>
{% if messages %}
{% for message in messages %}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment