diff --git a/opentech/public/forms/__init__.py b/opentech/public/forms/__init__.py index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..bb2741c81da1f285a4da9406913764ca18223bf1 100644 --- a/opentech/public/forms/__init__.py +++ b/opentech/public/forms/__init__.py @@ -0,0 +1 @@ +default_app_config = 'opentech.public.forms.apps.FormsConfig' diff --git a/opentech/public/forms/apps.py b/opentech/public/forms/apps.py new file mode 100644 index 0000000000000000000000000000000000000000..71dfe9124852b4f28997515934e3d068178e41ac --- /dev/null +++ b/opentech/public/forms/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class FormsConfig(AppConfig): + name = 'opentech.public.forms' + label = 'public_forms' diff --git a/opentech/public/forms/migrations/0001_initial.py b/opentech/public/forms/migrations/0001_initial.py index 8726df3dd4f5049c82f35d5e43b093bcc62790c7..0b2a9f28c17493f25918fb0330aa9a5b22908a80 100644 --- a/opentech/public/forms/migrations/0001_initial.py +++ b/opentech/public/forms/migrations/0001_initial.py @@ -59,6 +59,6 @@ class Migration(migrations.Migration): migrations.AddField( model_name='formfield', name='page', - field=modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='form_fields', to='forms.FormPage'), + field=modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='form_fields', to='public_forms.FormPage'), ), ] diff --git a/opentech/public/forms/migrations/0002_formpage_header_image.py b/opentech/public/forms/migrations/0002_formpage_header_image.py index 2bd9e02028cde7d91fe3f36f81f255e213c1869e..3ce1bf394c1bf381294d9fae5a23c9036a379ba4 100644 --- a/opentech/public/forms/migrations/0002_formpage_header_image.py +++ b/opentech/public/forms/migrations/0002_formpage_header_image.py @@ -10,7 +10,7 @@ class Migration(migrations.Migration): dependencies = [ ('images', '0001_initial'), - ('forms', '0001_initial'), + ('public_forms', '0001_initial'), ] operations = [ diff --git a/opentech/public/forms/templates/forms/form_page_landing.html b/opentech/public/forms/templates/public_forms/form_landing_page.html similarity index 100% rename from opentech/public/forms/templates/forms/form_page_landing.html rename to opentech/public/forms/templates/public_forms/form_landing_page.html diff --git a/opentech/public/forms/templates/forms/form_page.html b/opentech/public/forms/templates/public_forms/form_page.html similarity index 100% rename from opentech/public/forms/templates/forms/form_page.html rename to opentech/public/forms/templates/public_forms/form_page.html diff --git a/opentech/settings/base.py b/opentech/settings/base.py index ced6888bc9e76d811695568ff455bf531c856afa..22546b424a49d35b8533c7bca1123adcd054378f 100644 --- a/opentech/settings/base.py +++ b/opentech/settings/base.py @@ -60,6 +60,7 @@ INSTALLED_APPS = [ 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.sitemaps', + 'django.forms', ] MIDDLEWARE = [ @@ -98,6 +99,8 @@ TEMPLATES = [ }, ] +FORM_RENDERER = 'django.forms.renderers.TemplatesSetting' + WSGI_APPLICATION = 'opentech.wsgi.application'