diff --git a/addressfield/__init__.py b/addressfield/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/addressfield/models.py b/addressfield/models.py new file mode 100644 index 0000000000000000000000000000000000000000..71a836239075aa6e6e4ecb700e9c42c95c022d91 --- /dev/null +++ b/addressfield/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/opentech/apply/funds/static/address_form.js b/addressfield/static/address_form.js similarity index 100% rename from opentech/apply/funds/static/address_form.js rename to addressfield/static/address_form.js diff --git a/opentech/apply/funds/static/addressfield.min.json b/addressfield/static/addressfield.min.json similarity index 100% rename from opentech/apply/funds/static/addressfield.min.json rename to addressfield/static/addressfield.min.json diff --git a/opentech/apply/funds/static/jquery.addressfield.min.js b/addressfield/static/jquery.addressfield.min.js similarity index 100% rename from opentech/apply/funds/static/jquery.addressfield.min.js rename to addressfield/static/jquery.addressfield.min.js diff --git a/opentech/apply/funds/templates/funds/widgets/nested_with_label.html b/addressfield/templates/addressfield/widgets/nested_with_label.html similarity index 100% rename from opentech/apply/funds/templates/funds/widgets/nested_with_label.html rename to addressfield/templates/addressfield/widgets/nested_with_label.html diff --git a/opentech/apply/funds/widgets.py b/addressfield/widgets.py similarity index 97% rename from opentech/apply/funds/widgets.py rename to addressfield/widgets.py index 09cf7e95e58815d34f2948d6263dbf5b9865544d..7e1edce3880650de8cb89de22ca2f35b759f011c 100644 --- a/opentech/apply/funds/widgets.py +++ b/addressfield/widgets.py @@ -21,7 +21,7 @@ class KeepAttrsTextInput(KeepOwnAttrsWidget, forms.TextInput): class NestedMultiWidget(KeepOwnAttrsWidget, forms.MultiWidget): - template_name = 'funds/widgets/nested_with_label.html' + template_name = 'addressfield/widgets/nested_with_label.html' def __init__(self, *args, **kwargs): widgets = [ diff --git a/opentech/apply/funds/blocks.py b/opentech/apply/funds/blocks.py index 48834e637d95a4f4e62e42e555bf68a2badb7283..981717d57f5d68d74865fa9518e047386474fcdb 100644 --- a/opentech/apply/funds/blocks.py +++ b/opentech/apply/funds/blocks.py @@ -16,7 +16,7 @@ from opentech.apply.stream_forms.blocks import ( TextFieldBlock, ) from opentech.apply.categories.blocks import CategoryQuestionBlock -from .widgets import AddressWidget +from addressfield.widgets import AddressWidget def find_duplicates(items): diff --git a/opentech/settings/base.py b/opentech/settings/base.py index c4b14f5094d3e1845b9c434d1113cd8035c6c339..a2031e3fb5688136b5741424d9c537eccd53e28f 100644 --- a/opentech/settings/base.py +++ b/opentech/settings/base.py @@ -57,6 +57,7 @@ INSTALLED_APPS = [ 'tinymce', 'wagtailcaptcha', 'django_tables2', + 'addressfield', 'django.contrib.admin', 'django.contrib.auth',