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

Add status to project page

parent c32bd81b
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 12:13
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('projects', '0002_projectfunding'),
]
operations = [
migrations.AddField(
model_name='projectpage',
name='status',
field=models.CharField(choices=[('idea', 'Just an Idea (Pre-alpha)'), ('exists', 'It Exists! (Alpha/Beta)'), ('release', "It's basically done. (Release)"), ('production', 'People Use It. (Production)')], default='idea', max_length=25),
),
]
......@@ -83,6 +83,13 @@ class ProjectFunding(BaseFunding):
class ProjectPage(FundingMixin, BasePage):
STATUSES = (
('idea', "Just an Idea (Pre-alpha)"),
('exists', "It Exists! (Alpha/Beta)"),
('release', "It's basically done. (Release)"),
('production', "People Use It. (Production)"),
)
subpage_types = []
parent_page_types = ['ProjectIndexPage']
......@@ -94,12 +101,9 @@ class ProjectPage(FundingMixin, BasePage):
related_name='+',
on_delete=models.SET_NULL
)
status = models.CharField(choices=STATUSES, max_length=25, default=STATUSES[0][0])
body = StreamField(StoryBlock())
# Fields to add:
# otf_status
# status
search_fields = BasePage.search_fields + [
index.SearchField('introduction'),
index.SearchField('body'),
......@@ -108,6 +112,7 @@ class ProjectPage(FundingMixin, BasePage):
content_panels = BasePage.content_panels + [
ImageChooserPanel('icon'),
FieldPanel('introduction'),
FieldPanel('status'),
StreamFieldPanel('body'),
InlinePanel('contact_details', label="Contact Details"),
InlinePanel('related_pages', label="Related pages"),
......@@ -116,6 +121,8 @@ class ProjectPage(FundingMixin, BasePage):
class ProjectIndexPage(BasePage):
subpage_types = ['ProjectPage']
parent_page_types = ['home.Homepage']
introduction = models.TextField(blank=True)
......
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