Made Intro field in content page optional.

This commit is contained in:
Nick Seidenman (N6) 2017-02-17 19:17:03 +11:00
parent ac7228ec50
commit 901c636a6b
5 changed files with 36 additions and 5 deletions

View file

@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-02-17 07:57
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cms_pages', '0020_auto_20170217_1220'),
]
operations = [
migrations.AlterField(
model_name='contentpage',
name='intro',
field=models.CharField(blank=True, max_length=250),
),
migrations.AlterField(
model_name='newsindexpage',
name='intro',
field=models.CharField(blank=True, max_length=250),
),
migrations.AlterField(
model_name='newspage',
name='intro',
field=models.CharField(blank=True, max_length=250),
),
]

View file

@ -217,7 +217,7 @@ class AbstractContentPage(Page):
class Meta:
abstract = True
intro = models.CharField(max_length=250)
intro = models.CharField(max_length=250, blank=True)
body = StreamField([
("rich_text", blocks.RichTextBlock(required=False)),
@ -254,7 +254,6 @@ class ContentPage(AbstractContentPage):
inset_illustration = models.CharField(
choices=ILLUSTRATION_TYPES,
max_length=256,
required=False,
)
content_panels = AbstractContentPage.content_panels + [

View file

@ -245,7 +245,7 @@ DEBUG_TOOLBAR_PANELS = [
DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False,
'SHOW_TOOLBAR_CALLBACK': lambda x: True,
'SHOW_TOOLBAR_CALLBACK': lambda x: False,
}
LOGGING = {

View file

@ -24,7 +24,9 @@
<div class="col-md-1">xxx</div>
<div class="col-md-10" >
<div id="announcements" class="jumbotron-white">
{{ page.body }}
<h1>{{ page.title }}</h1>
<p>{{ page.intro }}</p>
<span>{{ page.body }}</span>
</div>
</div>
<div class="col-md-1">

View file

@ -67,7 +67,7 @@ nav {
background-color: #000;
width: 100%;
padding-top: 10px;
padding-bottom: 10px;
/*padding-bottom: 10px;*/
padding-left: 20px;
}