Skip to content
Snippets Groups Projects
Commit 58629ea6 authored by Todd Dembrey's avatar Todd Dembrey
Browse files

Update the default on the category to be the empty json dict

parent 123c9f28
No related branches found
No related tags found
No related merge requests found
# -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2018-01-17 22:22
# Generated by Django 1.11.8 on 2018-01-18 10:03
from __future__ import unicode_literals
from django.db import migrations, models
......@@ -16,6 +16,5 @@ class Migration(migrations.Migration):
model_name='projectpage',
name='categories',
field=models.TextField(default='{}'),
preserve_default=False,
),
]
......@@ -109,7 +109,7 @@ class ProjectPage(FundingMixin, BasePage):
status = models.CharField(choices=STATUSES, max_length=25, default=STATUSES[0][0])
body = StreamField(StoryBlock())
categories = models.TextField()
categories = models.TextField(default="{}")
search_fields = BasePage.search_fields + [
index.SearchField('introduction'),
......@@ -131,6 +131,7 @@ class ProjectPage(FundingMixin, BasePage):
options = [int(id) for options in categories.values() for id in options]
return Option.objects.select_related().filter(id__in=options).order_by('category')
class ProjectIndexPage(BasePage):
subpage_types = ['ProjectPage']
parent_page_types = ['home.Homepage']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment