Verified Commit 01a7cd69 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Make board/committee description an HTMLField

parent ea0ef4a4
# Generated by Django 2.0.2 on 2018-02-03 20:51
from django.db import migrations
import tinymce.models
class Migration(migrations.Migration):
dependencies = [
('activemembers', '0025_auto_20180108_1253'),
]
operations = [
migrations.AlterField(
model_name='committee',
name='description_en',
field=tinymce.models.HTMLField(verbose_name='Description (EN)'),
),
migrations.AlterField(
model_name='committee',
name='description_nl',
field=tinymce.models.HTMLField(verbose_name='Description (NL)'),
),
]
......@@ -8,6 +8,7 @@ from django.db import models
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from tinymce import HTMLField
from utils.translation import (ModelTranslateMeta, MultilingualField,
localize_attr_name)
......@@ -57,7 +58,7 @@ class Committee(models.Model, metaclass=ModelTranslateMeta):
)
description = MultilingualField(
models.TextField,
HTMLField,
verbose_name=_('Description'),
)
......
{% extends 'base.html' %}
{% load i18n thumbnail static %}
{% load i18n thumbnail static bleach_tags %}
{% block title %}{% trans "Board" %} {{ board.since.year }}-{{ board.until.year }} — {% trans "Boards" %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{% trans "Board" %} {{ board.since.year }}-{{ board.until.year }} — {% trans "Boards" %} — {{ block.super }}{% endblock %}
......@@ -26,7 +26,7 @@
{% if board.description %}
<div>
<h1 class="midhead">{% blocktrans with name=board.name%}About {{ name }}{% endblocktrans %}</h1>
<p class="text-center">{{ board.description }}</p>
<p class="text-center">{{ board.description|bleach }}</p>
</div>
{% endif %}
<div class="clearfix member-directory">
......
{% extends "base.html" %}
{% load i18n static thumbnail %}
{% load i18n static thumbnail bleach_tags %}
{% block title %}{{ committee.name }} — {% trans 'Committees' %} — {{ block.super }}{% endblock %}
{% block opengraph_title %}{{ committee.name }} — {% trans 'Committees' %} — {{ block.super }}{% endblock %}
......@@ -23,7 +23,7 @@
</div>
<div>
<h1 class="midhead">{% blocktrans with name=committee.name %}About the {{ name }}{% endblocktrans %}</h1>
<p class="text-center">{{ committee.description }}</p>
<p class="text-center">{{ committee.description|bleach }}</p>
</div>
<div class="clearfix member-directory">
<h1 class="midhead">{% trans 'Committee members' %}</h1>
......
Markdown is supported
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