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

Add workflow onto the fund model

parent 24b6bb53
No related branches found
No related tags found
No related merge requests found
# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-19 10:10
from __future__ import unicode_literals
from django.db import migrations, models
import opentech.apply.workflow
class Migration(migrations.Migration):
dependencies = [
('apply', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='fund',
name='workflow',
field=models.CharField(choices=[('single', opentech.apply.workflow.SingleStage), ('double', opentech.apply.workflow.DoubleStage)], default='single', max_length=100),
),
]
......@@ -6,6 +6,8 @@ from wagtail.wagtailsnippets.edit_handlers import SnippetChooserPanel
from opentech.utils.models import SocialFields, ListingFields
from .workflow import SingleStage, DoubleStage
class ApplyHomePage(Page, SocialFields, ListingFields):
# Only allow creating HomePages at the root level
......@@ -25,8 +27,14 @@ class ApplyHomePage(Page, SocialFields, ListingFields):
Page.promote_panels +
SocialFields.promote_panels +
ListingFields.promote_panels
)
class FundPage(Page):
parent_page_types = [ApplyHomePage]
WORKFLOWS = (
('single', SingleStage),
('double', DoubleStage),
)
name = models.CharField(max_length=60)
workflow = models.CharField(choices=WORKFLOWS, max_length=100, default=WORKFLOWS[0][0])
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