Skip to content
Snippets Groups Projects
Commit f47fbc89 authored by Todd Dembrey's avatar Todd Dembrey Committed by Fredrik Jonsson
Browse files

Update the seed commands for the new model structure

parent 61f68867
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,9 @@ from django.contrib.auth import get_user_model
from django.core.management.base import BaseCommand
from django.db import transaction
from opentech.apply.funds.models import ApplicationForm, LabForm, LabType
from opentech.apply.funds.models import ApplicationForm, LabType
from opentech.apply.funds.models.forms import LabBaseForm
from opentech.apply.home.models import ApplyHomePage
from opentech.apply.users.groups import STAFF_GROUP_NAME
......@@ -75,7 +77,7 @@ class Command(BaseCommand):
lab = LabType(title='Community lab', lead=lead, workflow_name='single')
apply_home.add_child(instance=lab)
lab_form = LabForm.objects.create(lab=lab, form=application_form)
lab_form = LabBaseForm.objects.create(lab=lab, form=application_form)
lab.forms = [lab_form]
lab.save()
......
......@@ -7,7 +7,8 @@ from django.core.management.base import BaseCommand
from django.db import transaction
from opentech.apply.categories.models import Category
from opentech.apply.funds.models import ApplicationForm, FundForm, FundType, Round
from opentech.apply.funds.models import ApplicationForm, FundType, Round
from opentech.apply.funds.models.forms import ApplicationBaseForm
from opentech.apply.home.models import ApplyHomePage
from opentech.apply.users.groups import STAFF_GROUP_NAME
......@@ -152,8 +153,8 @@ class Command(BaseCommand):
fund = FundType(title=CN_FUND_TITLE, workflow_name='double')
apply_home.add_child(instance=fund)
fund_form = FundForm.objects.create(fund=fund, form=application_form)
fund_form2 = FundForm.objects.create(fund=fund, form=proposal_form)
fund_form = ApplicationBaseForm.objects.create(application=fund, form=application_form)
fund_form2 = ApplicationBaseForm.objects.create(application=fund, form=proposal_form)
fund.forms = [fund_form, fund_form2]
fund.save()
......
......@@ -7,7 +7,9 @@ from django.core.management.base import BaseCommand
from django.db import transaction
from opentech.apply.categories.models import Category
from opentech.apply.funds.models import ApplicationForm, FundForm, FundType, Round
from opentech.apply.funds.models import ApplicationForm, FundType, Round
from opentech.apply.funds.models.forms import ApplicationBaseForm
from opentech.apply.home.models import ApplyHomePage
from opentech.apply.users.groups import STAFF_GROUP_NAME
......@@ -114,8 +116,8 @@ class Command(BaseCommand):
fund = FundType(title=FS_FUND_TITLE, workflow_name='double')
apply_home.add_child(instance=fund)
fund_form = FundForm.objects.create(fund=fund, form=application_form)
fund_form2 = FundForm.objects.create(fund=fund, form=proposal_form)
fund_form = ApplicationBaseForm.objects.create(application=fund, form=application_form)
fund_form2 = ApplicationBaseForm.objects.create(application=fund, form=proposal_form)
fund.forms = [fund_form, fund_form2]
fund.save()
......
......@@ -96,7 +96,7 @@ class Command(BaseCommand):
fund = FundType(title='Rapid Response', workflow_name='single')
apply_home.add_child(instance=fund)
fund_form = ApplicationBaseForm.objects.create(fund=fund, form=application_form)
fund_form = ApplicationBaseForm.objects.create(application=fund, form=application_form)
fund.forms = [fund_form]
fund.save()
......
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