diff --git a/addressfield/__init__.py b/addressfield/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/addressfield/models.py b/addressfield/models.py new file mode 100644 index 00000000..71a83623 --- /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 09cf7e95..7e1edce3 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 48834e63..981717d5 100644 --- a/opentech/apply/funds/blocks.py +++ b/opentech/apply/funds/blocks.py @@ -16,7 +16,7 @@ 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 c4b14f50..a2031e3f 100644 --- a/opentech/settings/base.py +++ b/opentech/settings/base.py @@ -57,6 +57,7 @@ 'tinymce', 'wagtailcaptcha', 'django_tables2', + 'addressfield', 'django.contrib.admin', 'django.contrib.auth',