Made Intro field in content page optional.
This commit is contained in:
parent
ac7228ec50
commit
901c636a6b
5 changed files with 36 additions and 5 deletions
30
cms_pages/migrations/0021_auto_20170217_1857.py
Normal file
30
cms_pages/migrations/0021_auto_20170217_1857.py
Normal 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),
|
||||||
|
),
|
||||||
|
]
|
|
@ -217,7 +217,7 @@ class AbstractContentPage(Page):
|
||||||
class Meta:
|
class Meta:
|
||||||
abstract = True
|
abstract = True
|
||||||
|
|
||||||
intro = models.CharField(max_length=250)
|
intro = models.CharField(max_length=250, blank=True)
|
||||||
|
|
||||||
body = StreamField([
|
body = StreamField([
|
||||||
("rich_text", blocks.RichTextBlock(required=False)),
|
("rich_text", blocks.RichTextBlock(required=False)),
|
||||||
|
@ -254,7 +254,6 @@ class ContentPage(AbstractContentPage):
|
||||||
inset_illustration = models.CharField(
|
inset_illustration = models.CharField(
|
||||||
choices=ILLUSTRATION_TYPES,
|
choices=ILLUSTRATION_TYPES,
|
||||||
max_length=256,
|
max_length=256,
|
||||||
required=False,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
content_panels = AbstractContentPage.content_panels + [
|
content_panels = AbstractContentPage.content_panels + [
|
||||||
|
|
|
@ -245,7 +245,7 @@ DEBUG_TOOLBAR_PANELS = [
|
||||||
|
|
||||||
DEBUG_TOOLBAR_CONFIG = {
|
DEBUG_TOOLBAR_CONFIG = {
|
||||||
'INTERCEPT_REDIRECTS': False,
|
'INTERCEPT_REDIRECTS': False,
|
||||||
'SHOW_TOOLBAR_CALLBACK': lambda x: True,
|
'SHOW_TOOLBAR_CALLBACK': lambda x: False,
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGGING = {
|
LOGGING = {
|
||||||
|
|
|
@ -24,7 +24,9 @@
|
||||||
<div class="col-md-1">xxx</div>
|
<div class="col-md-1">xxx</div>
|
||||||
<div class="col-md-10" >
|
<div class="col-md-10" >
|
||||||
<div id="announcements" class="jumbotron-white">
|
<div id="announcements" class="jumbotron-white">
|
||||||
{{ page.body }}
|
<h1>{{ page.title }}</h1>
|
||||||
|
<p>{{ page.intro }}</p>
|
||||||
|
<span>{{ page.body }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
|
|
|
@ -67,7 +67,7 @@ nav {
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
padding-bottom: 10px;
|
/*padding-bottom: 10px;*/
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue