Add instructions property to topic model
This commit is contained in:
parent
9bf7f2e9fa
commit
8774b8d324
|
|
@ -0,0 +1,18 @@
|
||||||
|
# Generated by Django 2.1.15 on 2020-04-10 18:43
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('books', '0019_auto_20200408_0841'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='topic',
|
||||||
|
name='instructions',
|
||||||
|
field=models.CharField(blank=True, default=None, max_length=255, null=True),
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
@ -19,12 +19,14 @@ class Topic(StrictHierarchyPage):
|
||||||
teaser = models.TextField()
|
teaser = models.TextField()
|
||||||
description = RichTextField(features=DEFAULT_RICH_TEXT_FEATURES)
|
description = RichTextField(features=DEFAULT_RICH_TEXT_FEATURES)
|
||||||
vimeo_id = models.CharField(max_length=200, blank=True, null=True, default=None)
|
vimeo_id = models.CharField(max_length=200, blank=True, null=True, default=None)
|
||||||
|
instructions = models.CharField(max_length=255, blank=True, null=True, default=None)
|
||||||
|
|
||||||
content_panels = [
|
content_panels = [
|
||||||
FieldPanel('title', classname="full title"),
|
FieldPanel('title', classname="full title"),
|
||||||
FieldPanel('order'),
|
FieldPanel('order'),
|
||||||
FieldPanel('teaser'),
|
FieldPanel('teaser'),
|
||||||
FieldPanel('vimeo_id'),
|
FieldPanel('vimeo_id'),
|
||||||
|
FieldPanel('instructions'),
|
||||||
FieldPanel('description'),
|
FieldPanel('description'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ class TopicNode(DjangoObjectType):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Topic
|
model = Topic
|
||||||
only_fields = [
|
only_fields = [
|
||||||
'slug', 'title', 'meta_title', 'teaser', 'description', 'vimeo_id', 'order'
|
'slug', 'title', 'meta_title', 'teaser', 'description', 'vimeo_id', 'order', 'instructions'
|
||||||
]
|
]
|
||||||
filter_fields = {
|
filter_fields = {
|
||||||
'slug': ['exact', 'icontains', 'in'],
|
'slug': ['exact', 'icontains', 'in'],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue