added markitup on Slot content override

This commit is contained in:
Brian Rosner 2012-10-26 16:01:01 -06:00
parent 19d826ad00
commit c09f887e72
3 changed files with 6 additions and 4 deletions

View file

@ -1,6 +1,8 @@
from django import forms
from django.db.models import Q
from markitup.widgets import MarkItUpWidget
from symposion.schedule.models import Presentation
@ -32,7 +34,7 @@ class SlotEditForm(forms.Form):
def build_content_override_field(self):
kwargs = {
"label": "Content",
"widget": forms.Textarea(attrs={"class": "span6"}),
"widget": MarkItUpWidget(),
"required": False,
"initial": self.slot.content_override,
}

View file

@ -48,7 +48,7 @@ class Slot(models.Model):
kind = models.ForeignKey(SlotKind)
start = models.TimeField()
end = models.TimeField()
content_override = models.TextField(blank=True)
content_override = MarkupField()
def assign(self, content):
"""

View file

@ -18,8 +18,8 @@
<div class="speaker">{{ slot.content.speaker }}</div>
{% endif %}
{% else %}
{% if slot.content_override %}
{{ slot.content_override|safe }}
{% if slot.content_override.raw %}
{{ slot.content_override.rendered|safe }}
{% else %}
{{ slot.kind.label }}
{% endif %}