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()
|
||||
description = RichTextField(features=DEFAULT_RICH_TEXT_FEATURES)
|
||||
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 = [
|
||||
FieldPanel('title', classname="full title"),
|
||||
FieldPanel('order'),
|
||||
FieldPanel('teaser'),
|
||||
FieldPanel('vimeo_id'),
|
||||
FieldPanel('instructions'),
|
||||
FieldPanel('description'),
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ class TopicNode(DjangoObjectType):
|
|||
class Meta:
|
||||
model = Topic
|
||||
only_fields = [
|
||||
'slug', 'title', 'meta_title', 'teaser', 'description', 'vimeo_id', 'order'
|
||||
'slug', 'title', 'meta_title', 'teaser', 'description', 'vimeo_id', 'order', 'instructions'
|
||||
]
|
||||
filter_fields = {
|
||||
'slug': ['exact', 'icontains', 'in'],
|
||||
|
|
|
|||
Loading…
Reference in New Issue