--- /dev/null
+# -*- coding: utf-8 -*-
+# Generated by Django 1.9.10 on 2016-10-21 15:35
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('organization-magazine', '0013_auto_20161013_2353'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='brief',
+ name='style',
+ field=models.CharField(choices=[('grey', 'grey'), ('yellow', 'yellow'), ('black', 'black')], default='', max_length=16, verbose_name='style'),
+ preserve_default=False,
+ ),
+ ]
from organization.core.models import *
from organization.magazine.apps import *
+BRIEF_STYLE_CHOICES = [
+ ('grey', _('grey')),
+ ('yellow', _('yellow')),
+ ('black', _('black'))
+]
class Article(BlogPost, SubTitled):
class Brief(Displayable, RichText):
+ style = models.CharField(_('style'), max_length=16, choices=BRIEF_STYLE_CHOICES)
text_button = models.CharField(blank=True, max_length=150, null=False, verbose_name=_('text button'))
external_content = models.URLField(blank=True, max_length=1000, null=False, verbose_name=_('external content'))
{% load i18n mezzanine_tags %}
<div class="brief-box">
-
+ {{ content.content_object.style }}
+
<div class="brief-box__head">
{% trans 'Brief !' %}
</div>
-
<h3 class="brief-box__title">{{content.content_object.title }}</h3>
<div class="brief-box__desc">
{{content.content_object.content|richtext_filters|safe|truncatechars_html:150 }}