diff --git a/opentech/public/funds/__init__.py b/opentech/public/funds/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2d9aa6a15b3cc680aa74c46b62a765839603a625 --- /dev/null +++ b/opentech/public/funds/__init__.py @@ -0,0 +1 @@ +default_app_config = 'opentech.public.funds.apps.FundsConfig' diff --git a/opentech/publicpages/admin.py b/opentech/public/funds/admin.py similarity index 100% rename from opentech/publicpages/admin.py rename to opentech/public/funds/admin.py diff --git a/opentech/public/funds/apps.py b/opentech/public/funds/apps.py new file mode 100644 index 0000000000000000000000000000000000000000..5c980bcdf7583884f254151716ab6e45a87c56bc --- /dev/null +++ b/opentech/public/funds/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class FundsConfig(AppConfig): + name = 'opentech.public.funds' + label = 'public_funds' diff --git a/opentech/publicpages/blocks.py b/opentech/public/funds/blocks.py similarity index 69% rename from opentech/publicpages/blocks.py rename to opentech/public/funds/blocks.py index 556a0090c98a9a0adb594aa2fc1fac1f343bd4ac..65dbea7652254222e793fef1e76ae27dfd9dac19 100644 --- a/opentech/publicpages/blocks.py +++ b/opentech/public/funds/blocks.py @@ -1,20 +1,20 @@ from wagtail.wagtailcore.blocks import StaticBlock -from opentech.utils.blocks import StoryBlock +from opentech.public.utils.blocks import StoryBlock class ProjectsBlock(StaticBlock): class Meta: icon = 'grip' label = 'List of Projects funded' - template = 'publicpages/blocks/related_projects.html' + template = 'funds/blocks/related_projects.html' class ReviewersBlock(StaticBlock): class Meta: icon = 'grip' label = 'List of fund Reviewers' - template = 'publicpages/blocks/related_reviewers.html' + template = 'funds/blocks/related_reviewers.html' class FundBlock(StoryBlock): diff --git a/opentech/publicpages/migrations/0001_initial.py b/opentech/public/funds/migrations/0001_initial.py similarity index 97% rename from opentech/publicpages/migrations/0001_initial.py rename to opentech/public/funds/migrations/0001_initial.py index b630540646676927296e2764497f458db03b47fd..5cab88a42287d90cf2fffadd5b55930b9aa7fbfc 100644 --- a/opentech/publicpages/migrations/0001_initial.py +++ b/opentech/public/funds/migrations/0001_initial.py @@ -47,7 +47,7 @@ class Migration(migrations.Migration): ('listing_title', models.CharField(blank=True, help_text='Override the page title used when this page appears in listings', max_length=255)), ('listing_summary', models.CharField(blank=True, help_text="The text summary used when this page appears in listings. It's also used as the description for search engines if the 'Search description' field above is not defined.", max_length=255)), ('introduction', models.TextField(blank=True)), - ('body', wagtail.wagtailcore.fields.StreamField((('heading', wagtail.wagtailcore.blocks.CharBlock(classname='full title', icon='title')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock()), ('image', wagtail.wagtailcore.blocks.StructBlock((('image', wagtail.wagtailimages.blocks.ImageChooserBlock()), ('caption', wagtail.wagtailcore.blocks.CharBlock(required=False))))), ('quote', wagtail.wagtailcore.blocks.StructBlock((('quote', wagtail.wagtailcore.blocks.CharBlock(classname='title')), ('attribution', wagtail.wagtailcore.blocks.CharBlock(required=False)), ('job_title', wagtail.wagtailcore.blocks.CharBlock(required=False))))), ('embed', wagtail.wagtailembeds.blocks.EmbedBlock()), ('call_to_action', wagtail.wagtailsnippets.blocks.SnippetChooserBlock('utils.CallToActionSnippet', template='blocks/call_to_action_block.html')), ('document', wagtail.wagtailcore.blocks.StructBlock((('document', wagtail.wagtaildocs.blocks.DocumentChooserBlock()), ('title', wagtail.wagtailcore.blocks.CharBlock(required=False))))), ('project_list', opentech.publicpages.blocks.ProjectsBlock()), ('reviewer_list', opentech.publicpages.blocks.ReviewersBlock())))), + ('body', wagtail.wagtailcore.fields.StreamField((('heading', wagtail.wagtailcore.blocks.CharBlock(classname='full title', icon='title')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock()), ('image', wagtail.wagtailcore.blocks.StructBlock((('image', wagtail.wagtailimages.blocks.ImageChooserBlock()), ('caption', wagtail.wagtailcore.blocks.CharBlock(required=False))))), ('quote', wagtail.wagtailcore.blocks.StructBlock((('quote', wagtail.wagtailcore.blocks.CharBlock(classname='title')), ('attribution', wagtail.wagtailcore.blocks.CharBlock(required=False)), ('job_title', wagtail.wagtailcore.blocks.CharBlock(required=False))))), ('embed', wagtail.wagtailembeds.blocks.EmbedBlock()), ('call_to_action', wagtail.wagtailsnippets.blocks.SnippetChooserBlock('utils.CallToActionSnippet', template='blocks/call_to_action_block.html')), ('document', wagtail.wagtailcore.blocks.StructBlock((('document', wagtail.wagtaildocs.blocks.DocumentChooserBlock()), ('title', wagtail.wagtailcore.blocks.CharBlock(required=False))))), ('project_list', opentech.public.funds.blocks.ProjectsBlock()), ('reviewer_list', opentech.public.funds.blocks.ReviewersBlock())))), ('fund_type', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='wagtailcore.Page')), ('header_image', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='images.CustomImage')), ('listing_image', models.ForeignKey(blank=True, help_text='Choose the image you wish to be displayed when this page appears in listings', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='images.CustomImage')), diff --git a/opentech/publicpages/__init__.py b/opentech/public/funds/migrations/__init__.py similarity index 100% rename from opentech/publicpages/__init__.py rename to opentech/public/funds/migrations/__init__.py diff --git a/opentech/publicpages/models.py b/opentech/public/funds/models.py similarity index 93% rename from opentech/publicpages/models.py rename to opentech/public/funds/models.py index ef5634469a760eb0b206fbb86b01ed52b2a9b45f..c5b012db1a3d44ee8c7b50f9714d72da77918257 100644 --- a/opentech/publicpages/models.py +++ b/opentech/public/funds/models.py @@ -9,7 +9,7 @@ from wagtail.wagtailadmin.edit_handlers import ( ) from wagtail.wagtailcore.fields import StreamField -from opentech.utils.models import BasePage +from opentech.public.utils.models import BasePage from .blocks import FundBlock @@ -30,7 +30,7 @@ class FundPage(BasePage): content_panels = BasePage.content_panels + [ FieldPanel('introduction'), - PageChooserPanel('fund_type', 'apply.FundType'), + PageChooserPanel('fund_type', 'funds.FundType'), StreamFieldPanel('body'), ] diff --git a/opentech/publicpages/templates/publicpages/blocks/related_projects.html b/opentech/public/funds/templates/funds/blocks/related_projects.html similarity index 100% rename from opentech/publicpages/templates/publicpages/blocks/related_projects.html rename to opentech/public/funds/templates/funds/blocks/related_projects.html diff --git a/opentech/publicpages/templates/publicpages/blocks/related_reviewers.html b/opentech/public/funds/templates/funds/blocks/related_reviewers.html similarity index 100% rename from opentech/publicpages/templates/publicpages/blocks/related_reviewers.html rename to opentech/public/funds/templates/funds/blocks/related_reviewers.html diff --git a/opentech/publicpages/templates/publicpages/fund_index.html b/opentech/public/funds/templates/funds/fund_index.html similarity index 100% rename from opentech/publicpages/templates/publicpages/fund_index.html rename to opentech/public/funds/templates/funds/fund_index.html diff --git a/opentech/publicpages/templates/publicpages/fund_page.html b/opentech/public/funds/templates/funds/fund_page.html similarity index 100% rename from opentech/publicpages/templates/publicpages/fund_page.html rename to opentech/public/funds/templates/funds/fund_page.html diff --git a/opentech/publicpages/templates/publicpages/includes/fund_apply_cta.html b/opentech/public/funds/templates/funds/includes/fund_apply_cta.html similarity index 100% rename from opentech/publicpages/templates/publicpages/includes/fund_apply_cta.html rename to opentech/public/funds/templates/funds/includes/fund_apply_cta.html diff --git a/opentech/publicpages/templates/publicpages/includes/project_listing.html b/opentech/public/funds/templates/funds/includes/project_listing.html similarity index 100% rename from opentech/publicpages/templates/publicpages/includes/project_listing.html rename to opentech/public/funds/templates/funds/includes/project_listing.html diff --git a/opentech/publicpages/tests.py b/opentech/public/funds/tests.py similarity index 100% rename from opentech/publicpages/tests.py rename to opentech/public/funds/tests.py diff --git a/opentech/publicpages/views.py b/opentech/public/funds/views.py similarity index 100% rename from opentech/publicpages/views.py rename to opentech/public/funds/views.py diff --git a/opentech/publicpages/apps.py b/opentech/publicpages/apps.py deleted file mode 100644 index 53878bf25c095bfa8fb37026e84cc6aabec71a09..0000000000000000000000000000000000000000 --- a/opentech/publicpages/apps.py +++ /dev/null @@ -1,5 +0,0 @@ -from django.apps import AppConfig - - -class PublicpagesConfig(AppConfig): - name = 'publicpages' diff --git a/opentech/publicpages/migrations/__init__.py b/opentech/publicpages/migrations/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/opentech/settings/base.py b/opentech/settings/base.py index 63dba99ec543f760d803b0a86d04c3a576a735c1..f072b3d64f9d1fb692a23afeab172b82363ba77f 100644 --- a/opentech/settings/base.py +++ b/opentech/settings/base.py @@ -13,7 +13,6 @@ BASE_DIR = os.path.dirname(PROJECT_DIR) INSTALLED_APPS = [ 'opentech.images', - 'opentech.publicpages', 'opentech.apply.categories', 'opentech.apply.funds', @@ -23,6 +22,7 @@ INSTALLED_APPS = [ 'opentech.public.esi', 'opentech.public.forms', + 'opentech.public.funds', 'opentech.public.home', 'opentech.public.navigation', 'opentech.public.news',