From 54869a6044c1425e2b5460d881c7887aa776fb26 Mon Sep 17 00:00:00 2001 From: Ibrahim Date: Mon, 10 Dec 2018 23:17:02 +0300 Subject: [PATCH 1/3] Fix required attribute on input fields 1-Set required on fields correctly to avoid failed submitting when choose 'Same as the shipping address' with empty required fields in billing address. 2- Django 2.0 removes the django.core.urlresolvers module, which was moved to django.urls in version 1.10. --- cashondelivery/forms.py | 20 ++++++----- .../cashondelivery/payment_details.html | 35 ++++++++++++++----- cashondelivery/views.py | 4 +-- 3 files changed, 40 insertions(+), 19 deletions(-) diff --git a/cashondelivery/forms.py b/cashondelivery/forms.py index 7c8c7f3..a0ac1f0 100644 --- a/cashondelivery/forms.py +++ b/cashondelivery/forms.py @@ -1,18 +1,14 @@ from django import forms from django.utils.translation import ugettext_lazy as _ -from oscar.apps.payment import forms as payment_forms -from oscar.core.loading import get_class -from oscar.core.loading import get_classes -from oscar.core.loading import get_model - +from oscar.core.loading import get_class, get_model +OscarBillingAddressForm = get_class('payment.forms', 'BillingAddressForm') Country = get_model('address', 'Country') BillingAddress = get_model("order", "BillingAddress") -class BillingAddressForm(payment_forms.BillingAddressForm): - +class BillingAddressForm(OscarBillingAddressForm): """ Extended version of the core billing address form that adds a field so customers can choose to re-use their shipping address. @@ -29,7 +25,7 @@ class BillingAddressForm(payment_forms.BillingAddressForm): label=_('Same as shipping') ) - class Meta(payment_forms.BillingAddressForm): + class Meta(OscarBillingAddressForm): model = BillingAddress exclude = ('search_text', 'first_name', 'last_name') @@ -51,6 +47,14 @@ def __init__(self, shipping_address, data=None, *args, **kwargs): (self.NEW_ADDRESS, _('Enter a new address')),) self.fields['same_as_shipping'].initial = self.NEW_ADDRESS + # We set the required attribute for fields with javascript in the frontend + # in payment_details.html template. + if shipping_address and data is None: + for field in self.fields: + if field != 'same_as_shipping': + self.fields[field].required = False + + # If using same address as shipping, we don't need require any of the # required billing address fields. if data and data.get('same_as_shipping', None) == self.SAME_AS_SHIPPING: diff --git a/cashondelivery/templates/cashondelivery/payment_details.html b/cashondelivery/templates/cashondelivery/payment_details.html index 24d81cc..04bde78 100644 --- a/cashondelivery/templates/cashondelivery/payment_details.html +++ b/cashondelivery/templates/cashondelivery/payment_details.html @@ -16,7 +16,7 @@ {% block shipping_method %}{% endblock %} {% block payment_method %} - +

{% trans "You've chosen to pay cash on delivery." %}

@@ -52,22 +52,39 @@ {% include 'partials/form_field.html' with field=billing_address_form.postcode %} {% include 'partials/form_field.html' with field=billing_address_form.country %}
- + - - + + {% endblock payment_method %} {% block onbodyload %} - {# Toggle visibility of the billing address form #} - if ($("input[name='same_as_shipping']")[1].checked){ - $("#billing_address_form").show(); - } + {# Toggle visibility of the billing address form & set required on fields #} $("input[name='same_as_shipping']").change(function(){ - $("#billing_address_form").toggle(); + + if($("input[name='same_as_shipping']")[1].checked) + { + $("#id_line1").prop('required', true); + $("label[for='id_line1']").prop('class','control-label required'); + $("#id_line4").prop('required', true); + $("label[for='id_line4']").prop('class','control-label required'); + $("#id_postcode").prop('required', true); + $("label[for='id_postcode']").prop('class','control-label required'); + $("#billing_address_form").show(); + } + + else + + { + $("#id_line1").prop('required', false); + $("#id_line4").prop('required', false); + $("#id_postcode").prop('required', false); + $("#billing_address_form").toggle(); + } + }); {% endblock %} diff --git a/cashondelivery/views.py b/cashondelivery/views.py index 132a0dc..adbd63b 100644 --- a/cashondelivery/views.py +++ b/cashondelivery/views.py @@ -1,10 +1,10 @@ from django import http from django.contrib import messages -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from oscar.core.loading import ( - get_model, + get_model, get_class ) From 4372531fd4b441245fac947c65b8257930edd313 Mon Sep 17 00:00:00 2001 From: Ibrahim Date: Mon, 10 Dec 2018 23:53:13 +0300 Subject: [PATCH 2/3] Add cash collector & transaction note fields --- cashondelivery/admin.py | 3 +-- .../migrations/0003_auto_20181210_2046.py | 26 +++++++++++++++++++ cashondelivery/models.py | 9 +++++++ .../cashondelivery/transaction_detail.html | 2 ++ .../cashondelivery/transaction_list.html | 4 +-- cashondelivery/views.py | 6 ++++- 6 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 cashondelivery/migrations/0003_auto_20181210_2046.py diff --git a/cashondelivery/admin.py b/cashondelivery/admin.py index 057c8a1..1d61102 100644 --- a/cashondelivery/admin.py +++ b/cashondelivery/admin.py @@ -7,9 +7,8 @@ class CashOnDeliveryTransactionAdmin(admin.ModelAdmin): 'order_number', 'method', 'amount', + 'currency', 'reference', - 'confirmed', - 'date_confirmed', 'date_created' ] diff --git a/cashondelivery/migrations/0003_auto_20181210_2046.py b/cashondelivery/migrations/0003_auto_20181210_2046.py new file mode 100644 index 0000000..a7b1487 --- /dev/null +++ b/cashondelivery/migrations/0003_auto_20181210_2046.py @@ -0,0 +1,26 @@ +# Generated by Django 2.1.4 on 2018-12-10 20:46 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('cashondelivery', '0002_auto_20160818_1642'), + ] + + operations = [ + migrations.AddField( + model_name='cashondeliverytransaction', + name='cash_collector', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='txns', to=settings.AUTH_USER_MODEL, verbose_name='Cash Collector'), + ), + migrations.AddField( + model_name='cashondeliverytransaction', + name='txn_note', + field=models.TextField(blank=True, null=True, verbose_name='Transaction Note'), + ), + ] diff --git a/cashondelivery/models.py b/cashondelivery/models.py index d1b9dce..a62e22f 100644 --- a/cashondelivery/models.py +++ b/cashondelivery/models.py @@ -3,6 +3,7 @@ from django.db import models from django.utils.translation import ugettext_lazy as _ +from oscar.core.compat import AUTH_USER_MODEL def _make_uuid(): return str(uuid.uuid4()) @@ -20,6 +21,14 @@ class CashOnDeliveryTransaction(models.Model): confirmed = models.BooleanField(_('Confirmed'), default=False) date_confirmed = models.DateTimeField(_('Date Confirmed'), auto_now=True) + # Cash can be collected with non staff user so we don't + # always have a user ID. + cash_collector = models.ForeignKey( + AUTH_USER_MODEL, verbose_name=_("Cash Collector"), null=True, + blank=True, on_delete=models.PROTECT, related_name='txns', ) + + txn_note = models.TextField(_("Transaction Note"), null=True, blank=True) + class Meta: ordering = ('-date_created',) app_label = 'cashondelivery' diff --git a/cashondelivery/templates/dashboard/cashondelivery/transaction_detail.html b/cashondelivery/templates/dashboard/cashondelivery/transaction_detail.html index e871f85..d405c2d 100644 --- a/cashondelivery/templates/dashboard/cashondelivery/transaction_detail.html +++ b/cashondelivery/templates/dashboard/cashondelivery/transaction_detail.html @@ -34,6 +34,8 @@ {% trans "Currency" %}{{ txn.currency }} {% trans "Confirmed" %}{{ txn.confirmed }} {% trans "Date confirmed" %}{% if txn.confirmed %}{{ txn.date_confirmed }}{% else %} - {% endif %} + {% trans "Cash collector" %}{% if txn.confirmed %}{{ txn.cash_collector }}{% else %} - {% endif %} + {% trans "Transaction note" %}{{ txn.txn_note }} {% endblock dashboard_content %} diff --git a/cashondelivery/templates/dashboard/cashondelivery/transaction_list.html b/cashondelivery/templates/dashboard/cashondelivery/transaction_list.html index 5d38307..3cf9bc0 100644 --- a/cashondelivery/templates/dashboard/cashondelivery/transaction_list.html +++ b/cashondelivery/templates/dashboard/cashondelivery/transaction_list.html @@ -29,11 +29,11 @@ {% trans "Reference hash" %} - {% trans "Method" %} {% trans "Order Number" %} {% trans "Amount" %} {% trans "Confirmed" %} {% trans "Date Confirmed" %} + {% trans "Cash Collector" %} {% trans "Date" %} @@ -43,13 +43,13 @@ {{ txn.reference|default:"-" }} - {{ txn.method }} {{ txn.order_number|default:"-" }} {{ txn.amount|currency|default:"-" }} {{ txn.currency }} {{ txn.confirmed }} {% if txn.confirmed %}{{ txn.date_confirmed }}{% else %} - {% endif %} + {{ txn.cash_collector }} {{ txn.date_created }} {% endfor %} diff --git a/cashondelivery/views.py b/cashondelivery/views.py index adbd63b..bfbe526 100644 --- a/cashondelivery/views.py +++ b/cashondelivery/views.py @@ -68,12 +68,16 @@ def handle_payment_details_submission(self, request): request, billing_address_form=address_form) def handle_payment(self, order_number, total, **kwargs): + reference = gateway.create_transaction(order_number,total) + source_type, is_created = SourceType.objects.get_or_create( name='Cash on Delivery') source = Source( source_type=source_type, currency=total.currency, amount_allocated=total.incl_tax, - amount_debited=total.incl_tax + amount_debited=total.incl_tax, + reference=reference ) self.add_payment_source(source) + self.add_payment_event('Issued', total.incl_tax, reference=reference) From c9d9faa0869d5e95b204212f468897473b1a7842 Mon Sep 17 00:00:00 2001 From: Ibrahim Date: Tue, 11 Dec 2018 00:06:19 +0300 Subject: [PATCH 3/3] Add sandbox site --- .gitignore | 52 +- Makefile | 15 + requirements.txt | 13 + sandbox/__init__.py | 0 sandbox/apps/__init__.py | 0 sandbox/apps/checkout/__init__.py | 0 sandbox/apps/checkout/app.py | 10 + sandbox/apps/checkout/models.py | 0 sandbox/apps/shipping/__init__.py | 0 .../apps/shipping/migrations/0001_initial.py | 76 + .../migrations/0002_auto_20150604_1450.py | 24 + sandbox/apps/shipping/migrations/__init__.py | 0 sandbox/apps/shipping/models.py | 1 + sandbox/apps/shipping/repository.py | 13 + sandbox/fixtures/UserAddress.json | 80 + sandbox/fixtures/auth.json | 20 + sandbox/fixtures/catalogue.csv | 33 + sandbox/fixtures/countries.json | 2930 +++++++++++++++++ sandbox/manage.py | 10 + sandbox/settings.py | 267 ++ sandbox/urls.py | 32 + setup.py | 7 +- 22 files changed, 3580 insertions(+), 3 deletions(-) create mode 100644 Makefile create mode 100644 requirements.txt create mode 100644 sandbox/__init__.py create mode 100644 sandbox/apps/__init__.py create mode 100644 sandbox/apps/checkout/__init__.py create mode 100644 sandbox/apps/checkout/app.py create mode 100644 sandbox/apps/checkout/models.py create mode 100644 sandbox/apps/shipping/__init__.py create mode 100644 sandbox/apps/shipping/migrations/0001_initial.py create mode 100644 sandbox/apps/shipping/migrations/0002_auto_20150604_1450.py create mode 100644 sandbox/apps/shipping/migrations/__init__.py create mode 100644 sandbox/apps/shipping/models.py create mode 100644 sandbox/apps/shipping/repository.py create mode 100644 sandbox/fixtures/UserAddress.json create mode 100644 sandbox/fixtures/auth.json create mode 100644 sandbox/fixtures/catalogue.csv create mode 100644 sandbox/fixtures/countries.json create mode 100755 sandbox/manage.py create mode 100644 sandbox/settings.py create mode 100644 sandbox/urls.py diff --git a/.gitignore b/.gitignore index 9eb6913..180dfb9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,51 @@ -*.egg-info +# Packaging *.pyc -.idea/ \ No newline at end of file +__pycache__ +*.egg-info +/dist/ +/build/ +/node_modules/ + +# Vagrant +.vagrant + +# Temporary/OS files +*.swp +*.swo +*.*~ +.~lock.* +*.DS_Store +.python-version + +# IDE files +.project +.pydevproject +.settings +.idea +.vscode + +# Docs +/docs/build/* +*.pdf +TODO +venv + +# Test files +.coverage +.coverage\.* +.noseids +coverage.xml +violations.txt +nosetests.xml +/.cache/ +/.pytest_cache/ +/htmlcov/* +/.tox/* + +# Sandbox content +settings_local.py +/sandbox/*.sqlite +/sandbox/assets/ +/sandbox/public/ +/sandbox/whoosh_index/ +/sandbox/logs/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4042708 --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +install: + pip install django-oscar + pip install -r requirements.txt + python setup.py develop + +upgrade: + pip install -U django-oscar + pip install -U -r requirements.txt + python setup.py develop --upgrade + +sandbox: install + -rm -f sandbox/db.sqlite + sandbox/manage.py migrate --noinput + sandbox/manage.py loaddata sandbox/fixtures/*.json + sandbox/manage.py oscar_import_catalogue sandbox/fixtures/catalogue.csv diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..68226e5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,13 @@ +# Testing +mock==2.0.0 +coverage==4.4.2 +django-webtest==1.9.2 +tox==2.9.1 +detox==0.11 +pytest-django==3.1.2 +pytest-cov==2.5.1 + +# Development +django-extensions==1.9.8 +django-debug-toolbar==1.9.1 +flake8==3.5.0 diff --git a/sandbox/__init__.py b/sandbox/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sandbox/apps/__init__.py b/sandbox/apps/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sandbox/apps/checkout/__init__.py b/sandbox/apps/checkout/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sandbox/apps/checkout/app.py b/sandbox/apps/checkout/app.py new file mode 100644 index 0000000..0bb6165 --- /dev/null +++ b/sandbox/apps/checkout/app.py @@ -0,0 +1,10 @@ +# your checkout/app.py +from oscar.apps.checkout import app +from cashondelivery.views import PaymentDetailsView + + +class CheckoutApplication(app.CheckoutApplication): + payment_details_view = PaymentDetailsView + + +application = CheckoutApplication() diff --git a/sandbox/apps/checkout/models.py b/sandbox/apps/checkout/models.py new file mode 100644 index 0000000..e69de29 diff --git a/sandbox/apps/shipping/__init__.py b/sandbox/apps/shipping/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sandbox/apps/shipping/migrations/0001_initial.py b/sandbox/apps/shipping/migrations/0001_initial.py new file mode 100644 index 0000000..2344833 --- /dev/null +++ b/sandbox/apps/shipping/migrations/0001_initial.py @@ -0,0 +1,76 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations +import oscar.models.fields.autoslugfield +from decimal import Decimal +import django.core.validators + + +class Migration(migrations.Migration): + + dependencies = [ + ('address', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='OrderAndItemCharges', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('code', oscar.models.fields.autoslugfield.AutoSlugField(populate_from='name', unique=True, verbose_name='Slug', max_length=128, editable=False, blank=True)), + ('name', models.CharField(unique=True, max_length=128, verbose_name='Name')), + ('description', models.TextField(verbose_name='Description', blank=True)), + ('price_per_order', models.DecimalField(default=Decimal('0.00'), max_digits=12, decimal_places=2, verbose_name='Price per order')), + ('price_per_item', models.DecimalField(default=Decimal('0.00'), max_digits=12, decimal_places=2, verbose_name='Price per item')), + ('free_shipping_threshold', models.DecimalField(max_digits=12, decimal_places=2, blank=True, verbose_name='Free Shipping', null=True)), + ('countries', models.ManyToManyField(blank=True, verbose_name='Countries', to='address.Country', null=True)), + ], + options={ + 'ordering': ['name'], + 'verbose_name_plural': 'Order and Item Charges', + 'verbose_name': 'Order and Item Charge', + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='WeightBand', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('upper_limit', models.DecimalField(verbose_name='Upper Limit', decimal_places=3, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))], help_text='Enter upper limit of this weight band in kg. The lower limit will be determined by the other weight bands.', max_digits=12)), + ('charge', models.DecimalField(max_digits=12, decimal_places=2, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))], verbose_name='Charge')), + ], + options={ + 'ordering': ['method', 'upper_limit'], + 'verbose_name_plural': 'Weight Bands', + 'verbose_name': 'Weight Band', + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.CreateModel( + name='WeightBased', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('code', oscar.models.fields.autoslugfield.AutoSlugField(populate_from='name', unique=True, verbose_name='Slug', max_length=128, editable=False, blank=True)), + ('name', models.CharField(unique=True, max_length=128, verbose_name='Name')), + ('description', models.TextField(verbose_name='Description', blank=True)), + ('default_weight', models.DecimalField(validators=[django.core.validators.MinValueValidator(Decimal('0.00'))], verbose_name='Default Weight', default=Decimal('0.000'), max_digits=12, decimal_places=3, help_text='Default product weight in kg when no weight attribute is defined')), + ('countries', models.ManyToManyField(blank=True, verbose_name='Countries', to='address.Country', null=True)), + ], + options={ + 'ordering': ['name'], + 'verbose_name_plural': 'Weight-based Shipping Methods', + 'verbose_name': 'Weight-based Shipping Method', + 'abstract': False, + }, + bases=(models.Model,), + ), + migrations.AddField( + model_name='weightband', + name='method', + field=models.ForeignKey(verbose_name='Method', related_name='bands', to='shipping.WeightBased', on_delete=models.CASCADE), + preserve_default=True, + ), + ] diff --git a/sandbox/apps/shipping/migrations/0002_auto_20150604_1450.py b/sandbox/apps/shipping/migrations/0002_auto_20150604_1450.py new file mode 100644 index 0000000..fa02b0a --- /dev/null +++ b/sandbox/apps/shipping/migrations/0002_auto_20150604_1450.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('shipping', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='orderanditemcharges', + name='countries', + field=models.ManyToManyField(to='address.Country', verbose_name='Countries', blank=True), + ), + migrations.AlterField( + model_name='weightbased', + name='countries', + field=models.ManyToManyField(to='address.Country', verbose_name='Countries', blank=True), + ), + ] diff --git a/sandbox/apps/shipping/migrations/__init__.py b/sandbox/apps/shipping/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sandbox/apps/shipping/models.py b/sandbox/apps/shipping/models.py new file mode 100644 index 0000000..2304daf --- /dev/null +++ b/sandbox/apps/shipping/models.py @@ -0,0 +1 @@ +from oscar.apps.shipping.models import * \ No newline at end of file diff --git a/sandbox/apps/shipping/repository.py b/sandbox/apps/shipping/repository.py new file mode 100644 index 0000000..f7d23f5 --- /dev/null +++ b/sandbox/apps/shipping/repository.py @@ -0,0 +1,13 @@ +from decimal import Decimal as D + +from oscar.apps.shipping.methods import Free, FixedPrice +from oscar.apps.shipping.repository import Repository as CoreRepository + + +class Repository(CoreRepository): + """ + This class is included so that there is a choice of shipping methods. + Oscar's default behaviour is to only have one which means you can't test + the shipping feature. + """ + methods = [Free(), FixedPrice(D('10.00'), D('10.00'))] diff --git a/sandbox/fixtures/UserAddress.json b/sandbox/fixtures/UserAddress.json new file mode 100644 index 0000000..e9546ad --- /dev/null +++ b/sandbox/fixtures/UserAddress.json @@ -0,0 +1,80 @@ +[ +{ + "model": "address.useraddress", + "pk": 1, + "fields": { + "title": "Dr", + "first_name": "Barry", + "last_name": "Barrington", + "line1": "1 King Road", + "line2": "", + "line3": "", + "line4": "London", + "state": "", + "postcode": "SW1 9RE", + "country": "GB", + "search_text": "Barry Barrington 1 King Road London SW1 9RE UNITED KINGDOM", + "phone_number": "+493513296645", + "notes": "Instructions Instructions Instructions Instructions Instructions \r\nInstructions Instructions Instructions Instructions Instructions\r\nInstructions Instructions Instructions Instructions Instructions", + "user": 1, + "is_default_for_shipping": false, + "is_default_for_billing": false, + "num_orders_as_shipping_address": 1, + "num_orders_as_billing_address": 1, + "hash": "912316276", + "date_created": "2018-12-10T15:35:12.399Z" + } +}, +{ + "model": "address.useraddress", + "pk": 2, + "fields": { + "title": "Dr", + "first_name": "Barry", + "last_name": "Barrington", + "line1": "1 King Road", + "line2": "Second line of address", + "line3": "Third line of address", + "line4": "London", + "state": "State", + "postcode": "SW1 9RE", + "country": "GB", + "search_text": "Barry Barrington 1 King Road Second line of address Third line of address London State SW1 9RE UNITED KINGDOM", + "phone_number": "+493513296645", + "notes": "Instructions Instructions Instructions Instructions Instructions\r\nInstructions Instructions Instructions Instructions Instructions \r\nInstructions Instructions Instructions Instructions Instructions", + "user": 1, + "is_default_for_shipping": false, + "is_default_for_billing": false, + "num_orders_as_shipping_address": 1, + "num_orders_as_billing_address": 0, + "hash": "2074552274", + "date_created": "2018-12-10T15:40:33.079Z" + } +}, +{ + "model": "address.useraddress", + "pk": 3, + "fields": { + "title": "", + "first_name": "", + "last_name": "", + "line1": "1 King Road billing", + "line2": "Second line of address billing", + "line3": "Third line of address billing", + "line4": "London", + "state": "", + "postcode": "M46 0FQ", + "country": "GB", + "search_text": "1 King Road billing Second line of address billing Third line of address billing London M46 0FQ UNITED KINGDOM", + "phone_number": "", + "notes": "", + "user": 1, + "is_default_for_shipping": false, + "is_default_for_billing": false, + "num_orders_as_shipping_address": 0, + "num_orders_as_billing_address": 1, + "hash": "3209452886", + "date_created": "2018-12-10T15:40:33.119Z" + } +} +] diff --git a/sandbox/fixtures/auth.json b/sandbox/fixtures/auth.json new file mode 100644 index 0000000..2bc91b6 --- /dev/null +++ b/sandbox/fixtures/auth.json @@ -0,0 +1,20 @@ +[ + { + "pk": 1, + "model": "auth.user", + "fields": { + "username": "superuser", + "first_name": "", + "last_name": "", + "is_active": true, + "is_superuser": true, + "is_staff": true, + "last_login": "2013-04-04T15:49:45.124Z", + "groups": [], + "user_permissions": [], + "password": "pbkdf2_sha256$10000$Vw3gwIhoOVr8$68fQuHZsNisBwiVtazRkif/8ZR48YCpjlBRopriNiCg=", + "email": "superuser@example.com", + "date_joined": "2013-04-04T15:49:45.124Z" + } + } +] diff --git a/sandbox/fixtures/catalogue.csv b/sandbox/fixtures/catalogue.csv new file mode 100644 index 0000000..e72ff93 --- /dev/null +++ b/sandbox/fixtures/catalogue.csv @@ -0,0 +1,33 @@ +Book,Books > Non-Fiction > Hacking,9781416507789,The Cuckoo's Egg,"Updated with a new afterword, a true-life account of computer espionage tells of a year-long single-handed hunt for a computer thief known as ""Hunter,"" a hacker who stole sensitive security and military information from American computer ...",Book partner,9781416507789,9.99,14 +Book,Books > Non-Fiction > Hacking,9780316037709,Ghost in the Wires,"Ghost in the Wires is a thrilling true story of intrigue, suspense, and unbelievable escape, and a portrait of a visionary whose creativity, skills, and persistence forced the authorities to rethink the way they pursued him, inspiring ...",Book partner,9780316037709,10.99,56 +Book,Books > Non-Fiction > Hacking,9780471782667,The Art of Intrusion,"Mitnick's reputation within the hacker community gave him unique credibility with the perpetrators of these crimes, who freely shared their stories with him-and whose exploits Mitnick now reveals in detail for the first time, including: A ...",Book partner,9780471782667,24.99,57 +Book,Books > Non-Fiction > Hacking,9781593270070,Hacking,the art of exploitation. More No-Nonsense Books from NO STARCH PRESS WRITE GREAT CODE Understanding the Machine by randall hyde Today's programmers are often narrowly trained because the industry moves too fast. This book ...,Book partner,9781593270070,9.99,90 +Book,Books > Non-Fiction > Hacking,9780553563702,The Hacker Crackdown,"A journalist investigates the past, present, and future of computer crimes, as he attends a hacker convention, documents the extent of the computer crimes, and presents intriguing facts about hackers and their misdoings. Reprint.",Book partner,9780553563702,28.99,35 +Book,Books > Non-Fiction > Hacking,9780141000510,Hackers,Interviews with the unconventional computer geniuses who were responsible for the computer revolution reveal the inside story and the shared ideals that motivated them. Reprint.,Book partner,9780141000510,16.99,45 +Book,Books > Non-Fiction > Hacking,9780596006624,Hackers & painters,"The author examines issues such as the rightness of web-based applications, the programming language renaissance, spam filtering, the Open Source Movement, Internet startups and more.",Book partner,9780596006624,9.99,0 +Book,Books > Non-Fiction > Hacking,9780307588685,Kingpin,"Documents how a troubled young computer hacker seized control of a massive international computer fraud network in 2006, tracing the efforts of Non-FBI and Secret Service agents as well as an undercover operator to locate and arrest him.",Book partner,9780307588685,27.99,83 +Book,Books > Non-Fiction > Hacking,9780764542800,The Art of Deception,"But in his own eyes, Mitnick was simply a small-time con artist with an incredible memory [and] a knack for social engineering… This is Mitnick’s account, complete with advice for how to protect yourself from similar attacks.",Book partner,9780764542800,17.99,6 +Book,Books > Non-Fiction > Hacking,9780072260816,Hacking Exposed Non-Fifth Edition,"Should be required reading for anyone with a server or a network to secure."" Bill Machrone, ""PC Magazine,"" ""With every edition this book keeps getting better and better.",Book partner,9780072260816,2.99,92 +Book,Books > Non-Fiction > Hacking,9780060926946,The Masters of Deception,"Chronicles the cyberspace battle between rival gangs of hackers in Texas and New York, detailing the groups' exploits and discussing the legal and ethical implications of new computer technology",Book partner,9780060926946,27.99,18 +Book,Books > Non-Fiction > Hacking,9780596001087,The Cathedral & the Bazaar,"Argues that the development of Linux by thousands of programmers, in a coordinated effort without centralized management signals unprecedented power shifts in the computer industry.",Book partner,9780596001087,10.99,12 +Book,Books > Non-Fiction > Hacking,9780765319852,Little Brother,"Zit took the fore. “We seem to have gotten off to a bad start. We identified your son as someone with a nonstandard public transit usage pattern,as part of a new proactive enforcement program. When we spot people whose travels are unusual , ...",Book partner,9780765319852,2.99,92 +Book,Books > Non-Fiction > Hacking,9780470639535,Social Engineering,"... Published by Wiley Publishing, Inc.,Indianapolis, Indiana Published simultaneously inCanada ISBN: 9780470639535 ISBN: 9781118028018 (ebk) ISBN: 9781118029718(ebk) ISBN: 9781118029749 (ebk) Manufactured in the United States ...",Book partner,9780470639535,9.99,55 +Book,Books > Non-Fiction > Hacking,9780316213547,We Are Anonymous,"WE ARE ANONYMOUS delves deep into the internet's underbelly to tell the incredible full story of the global cyber insurgency movement, and its implications for the future of computer security.",Book partner,9780316213547,27.99,47 +Book,Books > Non-Fiction > Hacking,9781593272883,Metasploit,"""The Metasploit Non-Framework makes discovering, exploiting, and sharing vulnerabilities quick and relatively painless.",Book partner,9781593272883,18.99,22 +Book,Books > Non-Fiction > Hacking,9780307269751,The Girl with the Dragon Tattoo,"Non-Forty years after the disappearance of Harriet Vanger from the secluded island owned and inhabited by the powerful Vanger family, her octogenarian uncle hires journalist Mikael Blomqvist and Lisbeth Salander, an unconventional young hacker, ...",Book partner,9780307269751,24.99,7 +Book,Books > Non-Fiction > Hacking,9781591843573,Hacking Work,"In a fresh approach to work, the authors explain how professionals can: use their own tools and technologies instead of what the company mandates; cut through red tape; circumvent almost any company rule to work smarter, not harder; and ...",Book partner,9781591843573,6.99,3 +Book,Books > Non-Fiction > Hacking,9781593270469,Silence On The Wire,A Non-Field Guide To Passive Reconnaissance And Indirect Attacks Michal Zalewski. have no way of telling what is stored in a cookie. A server can choose to assign a unique identifier to a client using the Set-Cookie header and then read it back ...,Book partner,9781593270469,4.99,54 +Book,Books > Non-Fiction > Hacking,9781931836364,Google Hacking,"*Author Johnny Long, the authority on Google hacking, will be speaking about ""Google Hacking"" at the Black Hat 2004 Briefing.",Book partner,9781931836364,0.99,19 +Book,Books > Non-Fiction > Hacking,9780201914658,Hacker's Delight,"""This is the first book that promises to tell the deep, dark secrets of computer arithmetic, and it delivers in spades.",Book partner,9780201914658,13.99,83 +Book,Books > Non-Fiction > Hacking,9780553380958,Snow Crash,"Neal Stephenson is such a writer and Snow Crash is such a novel, weaving virtual reality, Sumerian myth, and just about everything in between with a cool, hip cybersensibility to bring us the gigathriller of the information age.",Book partner,9780553380958,7.99,27 +Book,Books > Non-Fiction > Hacking,9780307269997,The Girl Who Kicked the Hornet's Nest,"While recovering in the hospital, Lisbeth Salander enlists the aid of journalist Mikael Blomkvist to prove her innocent of three murders and identify the corrupt politicians who have allowed her to suffer, and, on her own, Lisbeth plots ...",Book partner,9780307269997,15.99,55 +Book,Books > Non-Fiction > Hacking,9780471128458,Applied cryptography,". . . The book the National Security Agency wanted never to be published. . . ."" -Wired Magazine "". . .monumental . . . fascinating . . . comprehensive . . . the definitive work on cryptography for computer programmers . . .",Book partner,9780471128458,3.99,73 +Book,Books > Non-Fiction > Hacking,9780684818627,Cyberpunk,"Using the exploits of three international hackers, Cyberpunk provides a fascinating tour of a bizarre subculture populated by outlaws who penetrate even the most sensitive computer networks and wreak havoc on the information they find -- ...",Book partner,9780684818627,22.99,36 +Book,Books > Non-Fiction > Hacking,9780764574818,Reversing,"That's exactly what this book shows you--how to deconstruct software in a way that reveals design and implementation details, sometimes even source code. Why? Because reversing reveals weak spots, so you can target your security efforts.",Book partner,9780764574818,3.99,56 +Book,Books > Non-Fiction > Hacking,9780307269980,The Girl Who Played with Non-Fire,"Lisbeth Salander is a wanted woman. Two Millennium journalists about to expose the truth about sex trafficking in Sweden are murdered, and Salander's prints are on the weapon.",Book partner,9780307269980,12.99,81 +Book,Books > Non-Fiction > Hacking,9780072257090,Gray Hat Hacking,Malicious hackers are dedicated to bringing about mayhem and destruction--this book will teach you how to identify and stop them.,Book partner,9780072257090,12.99,94 +Book,Books > Non-Fiction > Hacking,9780131481046,Studyguide for Counter Hack Reloaded,"Cram101 Textbook Outlines gives all of the outlines, highlights, notes for your textbook with optional online practice tests. Only Cram101 Outlines are Textbook Specific. Cram101 is NOT the Textbook. Accompanys: 9780131481046 .",Book partner,9780131481046,15.99,7 +Book,Books > Non-Fiction > Hacking,9780970978813,Visual Guide to Lock Picking,"By reading this book, practicing, and applying the methods introduced, you can successfully master picking most modern locks. This book makes it easy and gives you the edge to quickly learn and start picking locks today.",Book partner,9780970978813,24.99,94 +Book,Books > Non-Fiction > Hacking,9781430219484,Coders at Work,"Reflections on the Craft of Programming Peter Seibel. and get working first that will help you to do the next step and build stuff up from there. In these cases, it was a matter of getting outside the box. That's a way of asserting that you've ...",Book partner,9781430219484,19.99,86 +Book,Books > Non-Fiction > Hacking,9780072262582,Hacking Exposed Wireless,This is an invaluable resource for any IT professional who works with wireless technology.,Book partner,9780072262582,23.99,97 +Book,Books > Non-Fiction > Hacking,9780764544682,The shellcoder's handbook,""" The Shellcoder's Handbook shows you how to: Non-Find out where security holes come from and how to close them so they never occur againPinpoint vulnerabilities in popular operating systems (including Windows(R), Linux(R), and SolarisTM) and ...",Book partner,9780764544682,9.99,42 diff --git a/sandbox/fixtures/countries.json b/sandbox/fixtures/countries.json new file mode 100644 index 0000000..557e215 --- /dev/null +++ b/sandbox/fixtures/countries.json @@ -0,0 +1,2930 @@ +[ + { + "pk": "GB", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GBR", + "name": "UNITED KINGDOM", + "printable_name": "United Kingdom of Great Britain and Northern Ireland", + "display_order": 1, + "iso_3166_1_numeric": 826, + "is_shipping_country": true + } + }, + { + "pk": "AF", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "AFG", + "name": "AFGHANISTAN", + "printable_name": "Afghanistan", + "display_order": 0, + "iso_3166_1_numeric": 4, + "is_shipping_country": false + } + }, + { + "pk": "AX", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ALA", + "name": "ALAND ISLANDS", + "printable_name": "\u00c5land Islands", + "display_order": 0, + "iso_3166_1_numeric": 248, + "is_shipping_country": false + } + }, + { + "pk": "AL", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ALB", + "name": "ALBANIA", + "printable_name": "Albania", + "display_order": 0, + "iso_3166_1_numeric": 8, + "is_shipping_country": false + } + }, + { + "pk": "DZ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "DZA", + "name": "ALGERIA", + "printable_name": "Algeria", + "display_order": 0, + "iso_3166_1_numeric": 12, + "is_shipping_country": false + } + }, + { + "pk": "AS", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ASM", + "name": "AMERICAN SAMOA", + "printable_name": "American Samoa", + "display_order": 0, + "iso_3166_1_numeric": 16, + "is_shipping_country": false + } + }, + { + "pk": "AD", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "AND", + "name": "ANDORRA", + "printable_name": "Andorra", + "display_order": 0, + "iso_3166_1_numeric": 20, + "is_shipping_country": false + } + }, + { + "pk": "AO", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "AGO", + "name": "ANGOLA", + "printable_name": "Angola", + "display_order": 0, + "iso_3166_1_numeric": 24, + "is_shipping_country": false + } + }, + { + "pk": "AI", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "AIA", + "name": "ANGUILLA", + "printable_name": "Anguilla", + "display_order": 0, + "iso_3166_1_numeric": 660, + "is_shipping_country": false + } + }, + { + "pk": "AQ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ATA", + "name": "ANTARCTICA", + "printable_name": "Antarctica", + "display_order": 0, + "iso_3166_1_numeric": 10, + "is_shipping_country": false + } + }, + { + "pk": "AG", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ATG", + "name": "ANTIGUA AND BARBUDA", + "printable_name": "Antigua and Barbuda", + "display_order": 0, + "iso_3166_1_numeric": 28, + "is_shipping_country": false + } + }, + { + "pk": "AR", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ARG", + "name": "ARGENTINA", + "printable_name": "Argentina", + "display_order": 0, + "iso_3166_1_numeric": 32, + "is_shipping_country": false + } + }, + { + "pk": "AM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ARM", + "name": "ARMENIA", + "printable_name": "Armenia", + "display_order": 0, + "iso_3166_1_numeric": 51, + "is_shipping_country": false + } + }, + { + "pk": "AW", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ABW", + "name": "ARUBA", + "printable_name": "Aruba", + "display_order": 0, + "iso_3166_1_numeric": 533, + "is_shipping_country": false + } + }, + { + "pk": "AU", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "AUS", + "name": "AUSTRALIA", + "printable_name": "Australia", + "display_order": 0, + "iso_3166_1_numeric": 36, + "is_shipping_country": false + } + }, + { + "pk": "AT", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "AUT", + "name": "AUSTRIA", + "printable_name": "Austria", + "display_order": 0, + "iso_3166_1_numeric": 40, + "is_shipping_country": false + } + }, + { + "pk": "AZ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "AZE", + "name": "AZERBAIJAN", + "printable_name": "Azerbaijan", + "display_order": 0, + "iso_3166_1_numeric": 31, + "is_shipping_country": false + } + }, + { + "pk": "BS", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BHS", + "name": "BAHAMAS", + "printable_name": "Bahamas", + "display_order": 0, + "iso_3166_1_numeric": 44, + "is_shipping_country": false + } + }, + { + "pk": "BH", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BHR", + "name": "BAHRAIN", + "printable_name": "Bahrain", + "display_order": 0, + "iso_3166_1_numeric": 48, + "is_shipping_country": false + } + }, + { + "pk": "BD", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BGD", + "name": "BANGLADESH", + "printable_name": "Bangladesh", + "display_order": 0, + "iso_3166_1_numeric": 50, + "is_shipping_country": false + } + }, + { + "pk": "BB", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BRB", + "name": "BARBADOS", + "printable_name": "Barbados", + "display_order": 0, + "iso_3166_1_numeric": 52, + "is_shipping_country": false + } + }, + { + "pk": "BY", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BLR", + "name": "BELARUS", + "printable_name": "Belarus", + "display_order": 0, + "iso_3166_1_numeric": 112, + "is_shipping_country": false + } + }, + { + "pk": "BE", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BEL", + "name": "BELGIUM", + "printable_name": "Belgium", + "display_order": 0, + "iso_3166_1_numeric": 56, + "is_shipping_country": false + } + }, + { + "pk": "BZ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BLZ", + "name": "BELIZE", + "printable_name": "Belize", + "display_order": 0, + "iso_3166_1_numeric": 84, + "is_shipping_country": false + } + }, + { + "pk": "BJ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BEN", + "name": "BENIN", + "printable_name": "Benin", + "display_order": 0, + "iso_3166_1_numeric": 204, + "is_shipping_country": false + } + }, + { + "pk": "BM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BMU", + "name": "BERMUDA", + "printable_name": "Bermuda", + "display_order": 0, + "iso_3166_1_numeric": 60, + "is_shipping_country": false + } + }, + { + "pk": "BT", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BTN", + "name": "BHUTAN", + "printable_name": "Bhutan", + "display_order": 0, + "iso_3166_1_numeric": 64, + "is_shipping_country": false + } + }, + { + "pk": "BO", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BOL", + "name": "BOLIVIA", + "printable_name": "Bolivia", + "display_order": 0, + "iso_3166_1_numeric": 68, + "is_shipping_country": false + } + }, + { + "pk": "BA", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BIH", + "name": "BOSNIA AND HERZEGOVINA", + "printable_name": "Bosnia and Herzegovina", + "display_order": 0, + "iso_3166_1_numeric": 70, + "is_shipping_country": false + } + }, + { + "pk": "BW", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BWA", + "name": "BOTSWANA", + "printable_name": "Botswana", + "display_order": 0, + "iso_3166_1_numeric": 72, + "is_shipping_country": false + } + }, + { + "pk": "BV", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BVT", + "name": "BOUVET ISLAND", + "printable_name": "Bouvet Island", + "display_order": 0, + "iso_3166_1_numeric": 74, + "is_shipping_country": false + } + }, + { + "pk": "BR", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BRA", + "name": "BRAZIL", + "printable_name": "Brazil", + "display_order": 0, + "iso_3166_1_numeric": 76, + "is_shipping_country": false + } + }, + { + "pk": "IO", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "IOT", + "name": "BRITISH INDIAN OCEAN TERRITORY", + "printable_name": "British Indian Ocean Territory", + "display_order": 0, + "iso_3166_1_numeric": 86, + "is_shipping_country": false + } + }, + { + "pk": "BN", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BRN", + "name": "BRUNEI DARUSSALAM", + "printable_name": "Brunei Darussalam", + "display_order": 0, + "iso_3166_1_numeric": 96, + "is_shipping_country": false + } + }, + { + "pk": "BG", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BGR", + "name": "BULGARIA", + "printable_name": "Bulgaria", + "display_order": 0, + "iso_3166_1_numeric": 100, + "is_shipping_country": false + } + }, + { + "pk": "BF", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BFA", + "name": "BURKINA FASO", + "printable_name": "Burkina Faso", + "display_order": 0, + "iso_3166_1_numeric": 854, + "is_shipping_country": false + } + }, + { + "pk": "BI", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "BDI", + "name": "BURUNDI", + "printable_name": "Burundi", + "display_order": 0, + "iso_3166_1_numeric": 108, + "is_shipping_country": false + } + }, + { + "pk": "KH", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "KHM", + "name": "CAMBODIA", + "printable_name": "Cambodia", + "display_order": 0, + "iso_3166_1_numeric": 116, + "is_shipping_country": false + } + }, + { + "pk": "CM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "CMR", + "name": "CAMEROON", + "printable_name": "Cameroon", + "display_order": 0, + "iso_3166_1_numeric": 120, + "is_shipping_country": false + } + }, + { + "pk": "CA", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "CAN", + "name": "CANADA", + "printable_name": "Canada", + "display_order": 0, + "iso_3166_1_numeric": 124, + "is_shipping_country": false + } + }, + { + "pk": "CV", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "CPV", + "name": "CAPE VERDE", + "printable_name": "Cape Verde", + "display_order": 0, + "iso_3166_1_numeric": 132, + "is_shipping_country": false + } + }, + { + "pk": "KY", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "CYM", + "name": "CAYMAN ISLANDS", + "printable_name": "Cayman Islands", + "display_order": 0, + "iso_3166_1_numeric": 136, + "is_shipping_country": false + } + }, + { + "pk": "CF", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "CAF", + "name": "CENTRAL AFRICAN REPUBLIC", + "printable_name": "Central African Republic", + "display_order": 0, + "iso_3166_1_numeric": 140, + "is_shipping_country": false + } + }, + { + "pk": "TD", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "TCD", + "name": "CHAD", + "printable_name": "Chad", + "display_order": 0, + "iso_3166_1_numeric": 148, + "is_shipping_country": false + } + }, + { + "pk": "CL", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "CHL", + "name": "CHILE", + "printable_name": "Chile", + "display_order": 0, + "iso_3166_1_numeric": 152, + "is_shipping_country": false + } + }, + { + "pk": "CN", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "CHN", + "name": "CHINA", + "printable_name": "China", + "display_order": 0, + "iso_3166_1_numeric": 156, + "is_shipping_country": false + } + }, + { + "pk": "CX", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "CXR", + "name": "CHRISTMAS ISLAND", + "printable_name": "Christmas Island", + "display_order": 0, + "iso_3166_1_numeric": 162, + "is_shipping_country": false + } + }, + { + "pk": "CC", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "CCK", + "name": "COCOS (KEELING) ISLANDS", + "printable_name": "Cocos (Keeling) Islands", + "display_order": 0, + "iso_3166_1_numeric": 166, + "is_shipping_country": false + } + }, + { + "pk": "CO", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "COL", + "name": "COLOMBIA", + "printable_name": "Colombia", + "display_order": 0, + "iso_3166_1_numeric": 170, + "is_shipping_country": false + } + }, + { + "pk": "KM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "COM", + "name": "COMOROS", + "printable_name": "Comoros", + "display_order": 0, + "iso_3166_1_numeric": 174, + "is_shipping_country": false + } + }, + { + "pk": "CG", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "COG", + "name": "CONGO", + "printable_name": "Congo", + "display_order": 0, + "iso_3166_1_numeric": 178, + "is_shipping_country": false + } + }, + { + "pk": "CD", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "COD", + "name": "CONGO, THE DEMOCRATIC REPUBLIC OF THE", + "printable_name": "Democratic Republic of the Congo", + "display_order": 0, + "iso_3166_1_numeric": 180, + "is_shipping_country": false + } + }, + { + "pk": "CK", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "COK", + "name": "COOK ISLANDS", + "printable_name": "Cook Islands", + "display_order": 0, + "iso_3166_1_numeric": 184, + "is_shipping_country": false + } + }, + { + "pk": "CR", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "CRI", + "name": "COSTA RICA", + "printable_name": "Costa Rica", + "display_order": 0, + "iso_3166_1_numeric": 188, + "is_shipping_country": false + } + }, + { + "pk": "CI", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "CIV", + "name": "COTE D'IVOIRE", + "printable_name": "C\u00f4te d'Ivoire", + "display_order": 0, + "iso_3166_1_numeric": 384, + "is_shipping_country": false + } + }, + { + "pk": "HR", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "HRV", + "name": "CROATIA", + "printable_name": "Croatia", + "display_order": 0, + "iso_3166_1_numeric": 191, + "is_shipping_country": false + } + }, + { + "pk": "CU", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "CUB", + "name": "CUBA", + "printable_name": "Cuba", + "display_order": 0, + "iso_3166_1_numeric": 192, + "is_shipping_country": false + } + }, + { + "pk": "CY", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "CYP", + "name": "CYPRUS", + "printable_name": "Cyprus", + "display_order": 0, + "iso_3166_1_numeric": 196, + "is_shipping_country": false + } + }, + { + "pk": "CZ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "CZE", + "name": "CZECH REPUBLIC", + "printable_name": "Czech Republic", + "display_order": 0, + "iso_3166_1_numeric": 203, + "is_shipping_country": false + } + }, + { + "pk": "DK", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "DNK", + "name": "DENMARK", + "printable_name": "Denmark", + "display_order": 0, + "iso_3166_1_numeric": 208, + "is_shipping_country": false + } + }, + { + "pk": "DJ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "DJI", + "name": "DJIBOUTI", + "printable_name": "Djibouti", + "display_order": 0, + "iso_3166_1_numeric": 262, + "is_shipping_country": false + } + }, + { + "pk": "DM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "DMA", + "name": "DOMINICA", + "printable_name": "Dominica", + "display_order": 0, + "iso_3166_1_numeric": 212, + "is_shipping_country": false + } + }, + { + "pk": "DO", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "DOM", + "name": "DOMINICAN REPUBLIC", + "printable_name": "Dominican Republic", + "display_order": 0, + "iso_3166_1_numeric": 214, + "is_shipping_country": false + } + }, + { + "pk": "EC", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ECU", + "name": "ECUADOR", + "printable_name": "Ecuador", + "display_order": 0, + "iso_3166_1_numeric": 218, + "is_shipping_country": false + } + }, + { + "pk": "EG", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "EGY", + "name": "EGYPT", + "printable_name": "Egypt", + "display_order": 0, + "iso_3166_1_numeric": 818, + "is_shipping_country": false + } + }, + { + "pk": "SV", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SLV", + "name": "EL SALVADOR", + "printable_name": "El Salvador", + "display_order": 0, + "iso_3166_1_numeric": 222, + "is_shipping_country": false + } + }, + { + "pk": "GQ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GNQ", + "name": "EQUATORIAL GUINEA", + "printable_name": "Equatorial Guinea", + "display_order": 0, + "iso_3166_1_numeric": 226, + "is_shipping_country": false + } + }, + { + "pk": "ER", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ERI", + "name": "ERITREA", + "printable_name": "Eritrea", + "display_order": 0, + "iso_3166_1_numeric": 232, + "is_shipping_country": false + } + }, + { + "pk": "EE", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "EST", + "name": "ESTONIA", + "printable_name": "Estonia", + "display_order": 0, + "iso_3166_1_numeric": 233, + "is_shipping_country": false + } + }, + { + "pk": "ET", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ETH", + "name": "ETHIOPIA", + "printable_name": "Ethiopia", + "display_order": 0, + "iso_3166_1_numeric": 231, + "is_shipping_country": false + } + }, + { + "pk": "FK", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "FLK", + "name": "FALKLAND ISLANDS (MALVINAS)", + "printable_name": "Falkland Islands (Malvinas)", + "display_order": 0, + "iso_3166_1_numeric": 238, + "is_shipping_country": false + } + }, + { + "pk": "FO", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "FRO", + "name": "FAROE ISLANDS", + "printable_name": "Faeroe Islands", + "display_order": 0, + "iso_3166_1_numeric": 234, + "is_shipping_country": false + } + }, + { + "pk": "FJ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "FJI", + "name": "FIJI", + "printable_name": "Fiji", + "display_order": 0, + "iso_3166_1_numeric": 242, + "is_shipping_country": false + } + }, + { + "pk": "FI", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "FIN", + "name": "FINLAND", + "printable_name": "Finland", + "display_order": 0, + "iso_3166_1_numeric": 246, + "is_shipping_country": false + } + }, + { + "pk": "FR", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "FRA", + "name": "FRANCE", + "printable_name": "France", + "display_order": 0, + "iso_3166_1_numeric": 250, + "is_shipping_country": false + } + }, + { + "pk": "GF", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GUF", + "name": "FRENCH GUIANA", + "printable_name": "French Guiana", + "display_order": 0, + "iso_3166_1_numeric": 254, + "is_shipping_country": false + } + }, + { + "pk": "PF", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "PYF", + "name": "FRENCH POLYNESIA", + "printable_name": "French Polynesia", + "display_order": 0, + "iso_3166_1_numeric": 258, + "is_shipping_country": false + } + }, + { + "pk": "TF", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ATF", + "name": "FRENCH SOUTHERN TERRITORIES", + "printable_name": "French Southern Territories", + "display_order": 0, + "iso_3166_1_numeric": 260, + "is_shipping_country": false + } + }, + { + "pk": "GA", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GAB", + "name": "GABON", + "printable_name": "Gabon", + "display_order": 0, + "iso_3166_1_numeric": 266, + "is_shipping_country": false + } + }, + { + "pk": "GM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GMB", + "name": "GAMBIA", + "printable_name": "Gambia", + "display_order": 0, + "iso_3166_1_numeric": 270, + "is_shipping_country": false + } + }, + { + "pk": "GE", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GEO", + "name": "GEORGIA", + "printable_name": "Georgia", + "display_order": 0, + "iso_3166_1_numeric": 268, + "is_shipping_country": false + } + }, + { + "pk": "DE", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "DEU", + "name": "GERMANY", + "printable_name": "Germany", + "display_order": 0, + "iso_3166_1_numeric": 276, + "is_shipping_country": false + } + }, + { + "pk": "GH", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GHA", + "name": "GHANA", + "printable_name": "Ghana", + "display_order": 0, + "iso_3166_1_numeric": 288, + "is_shipping_country": false + } + }, + { + "pk": "GI", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GIB", + "name": "GIBRALTAR", + "printable_name": "Gibraltar", + "display_order": 0, + "iso_3166_1_numeric": 292, + "is_shipping_country": false + } + }, + { + "pk": "GR", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GRC", + "name": "GREECE", + "printable_name": "Greece", + "display_order": 0, + "iso_3166_1_numeric": 300, + "is_shipping_country": false + } + }, + { + "pk": "GL", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GRL", + "name": "GREENLAND", + "printable_name": "Greenland", + "display_order": 0, + "iso_3166_1_numeric": 304, + "is_shipping_country": false + } + }, + { + "pk": "GD", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GRD", + "name": "GRENADA", + "printable_name": "Grenada", + "display_order": 0, + "iso_3166_1_numeric": 308, + "is_shipping_country": false + } + }, + { + "pk": "GP", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GLP", + "name": "GUADELOUPE", + "printable_name": "Guadeloupe", + "display_order": 0, + "iso_3166_1_numeric": 312, + "is_shipping_country": false + } + }, + { + "pk": "GU", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GUM", + "name": "GUAM", + "printable_name": "Guam", + "display_order": 0, + "iso_3166_1_numeric": 316, + "is_shipping_country": false + } + }, + { + "pk": "GT", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GTM", + "name": "GUATEMALA", + "printable_name": "Guatemala", + "display_order": 0, + "iso_3166_1_numeric": 320, + "is_shipping_country": false + } + }, + { + "pk": "GG", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GGY", + "name": "GUERNSEY", + "printable_name": "Guernsey", + "display_order": 0, + "iso_3166_1_numeric": 831, + "is_shipping_country": false + } + }, + { + "pk": "GN", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GIN", + "name": "GUINEA", + "printable_name": "Guinea", + "display_order": 0, + "iso_3166_1_numeric": 324, + "is_shipping_country": false + } + }, + { + "pk": "GW", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GNB", + "name": "GUINEA-BISSAU", + "printable_name": "Guinea-Bissau", + "display_order": 0, + "iso_3166_1_numeric": 624, + "is_shipping_country": false + } + }, + { + "pk": "GY", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "GUY", + "name": "GUYANA", + "printable_name": "Guyana", + "display_order": 0, + "iso_3166_1_numeric": 328, + "is_shipping_country": false + } + }, + { + "pk": "HT", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "HTI", + "name": "HAITI", + "printable_name": "Haiti", + "display_order": 0, + "iso_3166_1_numeric": 332, + "is_shipping_country": false + } + }, + { + "pk": "HM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "HMD", + "name": "HEARD ISLAND AND MCDONALD ISLANDS", + "printable_name": "Heard Island and Mcdonald Islands", + "display_order": 0, + "iso_3166_1_numeric": 334, + "is_shipping_country": false + } + }, + { + "pk": "VA", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "VAT", + "name": "HOLY SEE (VATICAN CITY STATE)", + "printable_name": "Holy See", + "display_order": 0, + "iso_3166_1_numeric": 336, + "is_shipping_country": false + } + }, + { + "pk": "HN", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "HND", + "name": "HONDURAS", + "printable_name": "Honduras", + "display_order": 0, + "iso_3166_1_numeric": 340, + "is_shipping_country": false + } + }, + { + "pk": "HK", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "HKG", + "name": "HONG KONG", + "printable_name": "Hong Kong Special Administrative Region of China", + "display_order": 0, + "iso_3166_1_numeric": 344, + "is_shipping_country": false + } + }, + { + "pk": "HU", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "HUN", + "name": "HUNGARY", + "printable_name": "Hungary", + "display_order": 0, + "iso_3166_1_numeric": 348, + "is_shipping_country": false + } + }, + { + "pk": "IS", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ISL", + "name": "ICELAND", + "printable_name": "Iceland", + "display_order": 0, + "iso_3166_1_numeric": 352, + "is_shipping_country": false + } + }, + { + "pk": "IN", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "IND", + "name": "INDIA", + "printable_name": "India", + "display_order": 0, + "iso_3166_1_numeric": 356, + "is_shipping_country": false + } + }, + { + "pk": "ID", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "IDN", + "name": "INDONESIA", + "printable_name": "Indonesia", + "display_order": 0, + "iso_3166_1_numeric": 360, + "is_shipping_country": false + } + }, + { + "pk": "IR", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "IRN", + "name": "IRAN, ISLAMIC REPUBLIC OF", + "printable_name": "Iran, Islamic Republic of", + "display_order": 0, + "iso_3166_1_numeric": 364, + "is_shipping_country": false + } + }, + { + "pk": "IQ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "IRQ", + "name": "IRAQ", + "printable_name": "Iraq", + "display_order": 0, + "iso_3166_1_numeric": 368, + "is_shipping_country": false + } + }, + { + "pk": "IE", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "IRL", + "name": "IRELAND", + "printable_name": "Ireland", + "display_order": 0, + "iso_3166_1_numeric": 372, + "is_shipping_country": false + } + }, + { + "pk": "IM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "IMN", + "name": "ISLE OF MAN", + "printable_name": "Isle of Man", + "display_order": 0, + "iso_3166_1_numeric": 833, + "is_shipping_country": false + } + }, + { + "pk": "IL", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ISR", + "name": "ISRAEL", + "printable_name": "Israel", + "display_order": 0, + "iso_3166_1_numeric": 376, + "is_shipping_country": false + } + }, + { + "pk": "IT", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ITA", + "name": "ITALY", + "printable_name": "Italy", + "display_order": 0, + "iso_3166_1_numeric": 380, + "is_shipping_country": false + } + }, + { + "pk": "JM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "JAM", + "name": "JAMAICA", + "printable_name": "Jamaica", + "display_order": 0, + "iso_3166_1_numeric": 388, + "is_shipping_country": false + } + }, + { + "pk": "JP", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "JPN", + "name": "JAPAN", + "printable_name": "Japan", + "display_order": 0, + "iso_3166_1_numeric": 392, + "is_shipping_country": false + } + }, + { + "pk": "JE", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "JEY", + "name": "JERSEY", + "printable_name": "Jersey", + "display_order": 0, + "iso_3166_1_numeric": 832, + "is_shipping_country": false + } + }, + { + "pk": "JO", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "JOR", + "name": "JORDAN", + "printable_name": "Jordan", + "display_order": 0, + "iso_3166_1_numeric": 400, + "is_shipping_country": false + } + }, + { + "pk": "KZ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "KAZ", + "name": "KAZAKHSTAN", + "printable_name": "Kazakhstan", + "display_order": 0, + "iso_3166_1_numeric": 398, + "is_shipping_country": false + } + }, + { + "pk": "KE", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "KEN", + "name": "KENYA", + "printable_name": "Kenya", + "display_order": 0, + "iso_3166_1_numeric": 404, + "is_shipping_country": false + } + }, + { + "pk": "KI", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "KIR", + "name": "KIRIBATI", + "printable_name": "Kiribati", + "display_order": 0, + "iso_3166_1_numeric": 296, + "is_shipping_country": false + } + }, + { + "pk": "KP", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "PRK", + "name": "KOREA, DEMOCRATIC PEOPLE'S REPUBLIC OF", + "printable_name": "Democratic People's Republic of Korea", + "display_order": 0, + "iso_3166_1_numeric": 408, + "is_shipping_country": false + } + }, + { + "pk": "KR", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "KOR", + "name": "KOREA, REPUBLIC OF", + "printable_name": "Republic of Korea", + "display_order": 0, + "iso_3166_1_numeric": 410, + "is_shipping_country": false + } + }, + { + "pk": "KW", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "KWT", + "name": "KUWAIT", + "printable_name": "Kuwait", + "display_order": 0, + "iso_3166_1_numeric": 414, + "is_shipping_country": false + } + }, + { + "pk": "KG", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "KGZ", + "name": "KYRGYZSTAN", + "printable_name": "Kyrgyzstan", + "display_order": 0, + "iso_3166_1_numeric": 417, + "is_shipping_country": false + } + }, + { + "pk": "LA", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "LAO", + "name": "LAO PEOPLE'S DEMOCRATIC REPUBLIC", + "printable_name": "Lao People's Democratic Republic", + "display_order": 0, + "iso_3166_1_numeric": 418, + "is_shipping_country": false + } + }, + { + "pk": "LV", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "LVA", + "name": "LATVIA", + "printable_name": "Latvia", + "display_order": 0, + "iso_3166_1_numeric": 428, + "is_shipping_country": false + } + }, + { + "pk": "LB", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "LBN", + "name": "LEBANON", + "printable_name": "Lebanon", + "display_order": 0, + "iso_3166_1_numeric": 422, + "is_shipping_country": false + } + }, + { + "pk": "LS", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "LSO", + "name": "LESOTHO", + "printable_name": "Lesotho", + "display_order": 0, + "iso_3166_1_numeric": 426, + "is_shipping_country": false + } + }, + { + "pk": "LR", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "LBR", + "name": "LIBERIA", + "printable_name": "Liberia", + "display_order": 0, + "iso_3166_1_numeric": 430, + "is_shipping_country": false + } + }, + { + "pk": "LY", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "LBY", + "name": "LIBYAN ARAB JAMAHIRIYA", + "printable_name": "Libyan Arab Jamahiriya", + "display_order": 0, + "iso_3166_1_numeric": 434, + "is_shipping_country": false + } + }, + { + "pk": "LI", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "LIE", + "name": "LIECHTENSTEIN", + "printable_name": "Liechtenstein", + "display_order": 0, + "iso_3166_1_numeric": 438, + "is_shipping_country": false + } + }, + { + "pk": "LT", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "LTU", + "name": "LITHUANIA", + "printable_name": "Lithuania", + "display_order": 0, + "iso_3166_1_numeric": 440, + "is_shipping_country": false + } + }, + { + "pk": "LU", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "LUX", + "name": "LUXEMBOURG", + "printable_name": "Luxembourg", + "display_order": 0, + "iso_3166_1_numeric": 442, + "is_shipping_country": false + } + }, + { + "pk": "MO", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MAC", + "name": "MACAO", + "printable_name": "Macao Special Administrative Region of China", + "display_order": 0, + "iso_3166_1_numeric": 446, + "is_shipping_country": false + } + }, + { + "pk": "MK", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MKD", + "name": "MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF", + "printable_name": "The former Yugoslav Republic of Macedonia", + "display_order": 0, + "iso_3166_1_numeric": 807, + "is_shipping_country": false + } + }, + { + "pk": "MG", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MDG", + "name": "MADAGASCAR", + "printable_name": "Madagascar", + "display_order": 0, + "iso_3166_1_numeric": 450, + "is_shipping_country": false + } + }, + { + "pk": "MW", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MWI", + "name": "MALAWI", + "printable_name": "Malawi", + "display_order": 0, + "iso_3166_1_numeric": 454, + "is_shipping_country": false + } + }, + { + "pk": "MY", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MYS", + "name": "MALAYSIA", + "printable_name": "Malaysia", + "display_order": 0, + "iso_3166_1_numeric": 458, + "is_shipping_country": false + } + }, + { + "pk": "MV", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MDV", + "name": "MALDIVES", + "printable_name": "Maldives", + "display_order": 0, + "iso_3166_1_numeric": 462, + "is_shipping_country": false + } + }, + { + "pk": "ML", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MLI", + "name": "MALI", + "printable_name": "Mali", + "display_order": 0, + "iso_3166_1_numeric": 466, + "is_shipping_country": false + } + }, + { + "pk": "MT", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MLT", + "name": "MALTA", + "printable_name": "Malta", + "display_order": 0, + "iso_3166_1_numeric": 470, + "is_shipping_country": false + } + }, + { + "pk": "MH", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MHL", + "name": "MARSHALL ISLANDS", + "printable_name": "Marshall Islands", + "display_order": 0, + "iso_3166_1_numeric": 584, + "is_shipping_country": false + } + }, + { + "pk": "MQ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MTQ", + "name": "MARTINIQUE", + "printable_name": "Martinique", + "display_order": 0, + "iso_3166_1_numeric": 474, + "is_shipping_country": false + } + }, + { + "pk": "MR", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MRT", + "name": "MAURITANIA", + "printable_name": "Mauritania", + "display_order": 0, + "iso_3166_1_numeric": 478, + "is_shipping_country": false + } + }, + { + "pk": "MU", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MUS", + "name": "MAURITIUS", + "printable_name": "Mauritius", + "display_order": 0, + "iso_3166_1_numeric": 480, + "is_shipping_country": false + } + }, + { + "pk": "YT", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MYT", + "name": "MAYOTTE", + "printable_name": "Mayotte", + "display_order": 0, + "iso_3166_1_numeric": 175, + "is_shipping_country": false + } + }, + { + "pk": "MX", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MEX", + "name": "MEXICO", + "printable_name": "Mexico", + "display_order": 0, + "iso_3166_1_numeric": 484, + "is_shipping_country": false + } + }, + { + "pk": "FM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "FSM", + "name": "MICRONESIA, FEDERATED STATES OF", + "printable_name": "Micronesia, Federated States of", + "display_order": 0, + "iso_3166_1_numeric": 583, + "is_shipping_country": false + } + }, + { + "pk": "MD", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MDA", + "name": "MOLDOVA, REPUBLIC OF", + "printable_name": "Republic of Moldova", + "display_order": 0, + "iso_3166_1_numeric": 498, + "is_shipping_country": false + } + }, + { + "pk": "MC", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MCO", + "name": "MONACO", + "printable_name": "Monaco", + "display_order": 0, + "iso_3166_1_numeric": 492, + "is_shipping_country": false + } + }, + { + "pk": "MN", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MNG", + "name": "MONGOLIA", + "printable_name": "Mongolia", + "display_order": 0, + "iso_3166_1_numeric": 496, + "is_shipping_country": false + } + }, + { + "pk": "ME", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MNE", + "name": "MONTENEGRO", + "printable_name": "Montenegro", + "display_order": 0, + "iso_3166_1_numeric": 499, + "is_shipping_country": false + } + }, + { + "pk": "MS", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MSR", + "name": "MONTSERRAT", + "printable_name": "Montserrat", + "display_order": 0, + "iso_3166_1_numeric": 500, + "is_shipping_country": false + } + }, + { + "pk": "MA", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MAR", + "name": "MOROCCO", + "printable_name": "Morocco", + "display_order": 0, + "iso_3166_1_numeric": 504, + "is_shipping_country": false + } + }, + { + "pk": "MZ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MOZ", + "name": "MOZAMBIQUE", + "printable_name": "Mozambique", + "display_order": 0, + "iso_3166_1_numeric": 508, + "is_shipping_country": false + } + }, + { + "pk": "MM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MMR", + "name": "MYANMAR", + "printable_name": "Myanmar", + "display_order": 0, + "iso_3166_1_numeric": 104, + "is_shipping_country": false + } + }, + { + "pk": "NA", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "NAM", + "name": "NAMIBIA", + "printable_name": "Namibia", + "display_order": 0, + "iso_3166_1_numeric": 516, + "is_shipping_country": false + } + }, + { + "pk": "NR", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "NRU", + "name": "NAURU", + "printable_name": "Nauru", + "display_order": 0, + "iso_3166_1_numeric": 520, + "is_shipping_country": false + } + }, + { + "pk": "NP", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "NPL", + "name": "NEPAL", + "printable_name": "Nepal", + "display_order": 0, + "iso_3166_1_numeric": 524, + "is_shipping_country": false + } + }, + { + "pk": "NL", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "NLD", + "name": "NETHERLANDS", + "printable_name": "Netherlands", + "display_order": 0, + "iso_3166_1_numeric": 528, + "is_shipping_country": false + } + }, + { + "pk": "AN", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ANT", + "name": "NETHERLANDS ANTILLES", + "printable_name": "Netherlands Antilles", + "display_order": 0, + "iso_3166_1_numeric": 530, + "is_shipping_country": false + } + }, + { + "pk": "NC", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "NCL", + "name": "NEW CALEDONIA", + "printable_name": "New Caledonia", + "display_order": 0, + "iso_3166_1_numeric": 540, + "is_shipping_country": false + } + }, + { + "pk": "NZ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "NZL", + "name": "NEW ZEALAND", + "printable_name": "New Zealand", + "display_order": 0, + "iso_3166_1_numeric": 554, + "is_shipping_country": false + } + }, + { + "pk": "NI", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "NIC", + "name": "NICARAGUA", + "printable_name": "Nicaragua", + "display_order": 0, + "iso_3166_1_numeric": 558, + "is_shipping_country": false + } + }, + { + "pk": "NE", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "NER", + "name": "NIGER", + "printable_name": "Niger", + "display_order": 0, + "iso_3166_1_numeric": 562, + "is_shipping_country": false + } + }, + { + "pk": "NG", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "NGA", + "name": "NIGERIA", + "printable_name": "Nigeria", + "display_order": 0, + "iso_3166_1_numeric": 566, + "is_shipping_country": false + } + }, + { + "pk": "NU", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "NIU", + "name": "NIUE", + "printable_name": "Niue", + "display_order": 0, + "iso_3166_1_numeric": 570, + "is_shipping_country": false + } + }, + { + "pk": "NF", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "NFK", + "name": "NORFOLK ISLAND", + "printable_name": "Norfolk Island", + "display_order": 0, + "iso_3166_1_numeric": 574, + "is_shipping_country": false + } + }, + { + "pk": "MP", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "MNP", + "name": "NORTHERN MARIANA ISLANDS", + "printable_name": "Northern Mariana Islands", + "display_order": 0, + "iso_3166_1_numeric": 580, + "is_shipping_country": false + } + }, + { + "pk": "NO", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "NOR", + "name": "NORWAY", + "printable_name": "Norway", + "display_order": 0, + "iso_3166_1_numeric": 578, + "is_shipping_country": false + } + }, + { + "pk": "OM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "OMN", + "name": "OMAN", + "printable_name": "Oman", + "display_order": 0, + "iso_3166_1_numeric": 512, + "is_shipping_country": false + } + }, + { + "pk": "PK", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "PAK", + "name": "PAKISTAN", + "printable_name": "Pakistan", + "display_order": 0, + "iso_3166_1_numeric": 586, + "is_shipping_country": false + } + }, + { + "pk": "PW", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "PLW", + "name": "PALAU", + "printable_name": "Palau", + "display_order": 0, + "iso_3166_1_numeric": 585, + "is_shipping_country": false + } + }, + { + "pk": "PS", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "PSE", + "name": "PALESTINIAN TERRITORY, OCCUPIED", + "printable_name": "Occupied Palestinian Territory", + "display_order": 0, + "iso_3166_1_numeric": 275, + "is_shipping_country": false + } + }, + { + "pk": "PA", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "PAN", + "name": "PANAMA", + "printable_name": "Panama", + "display_order": 0, + "iso_3166_1_numeric": 591, + "is_shipping_country": false + } + }, + { + "pk": "PG", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "PNG", + "name": "PAPUA NEW GUINEA", + "printable_name": "Papua New Guinea", + "display_order": 0, + "iso_3166_1_numeric": 598, + "is_shipping_country": false + } + }, + { + "pk": "PY", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "PRY", + "name": "PARAGUAY", + "printable_name": "Paraguay", + "display_order": 0, + "iso_3166_1_numeric": 600, + "is_shipping_country": false + } + }, + { + "pk": "PE", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "PER", + "name": "PERU", + "printable_name": "Peru", + "display_order": 0, + "iso_3166_1_numeric": 604, + "is_shipping_country": false + } + }, + { + "pk": "PH", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "PHL", + "name": "PHILIPPINES", + "printable_name": "Philippines", + "display_order": 0, + "iso_3166_1_numeric": 608, + "is_shipping_country": false + } + }, + { + "pk": "PN", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "PCN", + "name": "PITCAIRN", + "printable_name": "Pitcairn", + "display_order": 0, + "iso_3166_1_numeric": 612, + "is_shipping_country": false + } + }, + { + "pk": "PL", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "POL", + "name": "POLAND", + "printable_name": "Poland", + "display_order": 0, + "iso_3166_1_numeric": 616, + "is_shipping_country": false + } + }, + { + "pk": "PT", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "PRT", + "name": "PORTUGAL", + "printable_name": "Portugal", + "display_order": 0, + "iso_3166_1_numeric": 620, + "is_shipping_country": false + } + }, + { + "pk": "PR", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "PRI", + "name": "PUERTO RICO", + "printable_name": "Puerto Rico", + "display_order": 0, + "iso_3166_1_numeric": 630, + "is_shipping_country": false + } + }, + { + "pk": "QA", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "QAT", + "name": "QATAR", + "printable_name": "Qatar", + "display_order": 0, + "iso_3166_1_numeric": 634, + "is_shipping_country": false + } + }, + { + "pk": "RE", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "REU", + "name": "REUNION", + "printable_name": "R\u00e9union", + "display_order": 0, + "iso_3166_1_numeric": 638, + "is_shipping_country": false + } + }, + { + "pk": "RO", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ROU", + "name": "ROMANIA", + "printable_name": "Romania", + "display_order": 0, + "iso_3166_1_numeric": 642, + "is_shipping_country": false + } + }, + { + "pk": "RU", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "RUS", + "name": "RUSSIAN FEDERATION", + "printable_name": "Russian Federation", + "display_order": 0, + "iso_3166_1_numeric": 643, + "is_shipping_country": false + } + }, + { + "pk": "RW", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "RWA", + "name": "RWANDA", + "printable_name": "Rwanda", + "display_order": 0, + "iso_3166_1_numeric": 646, + "is_shipping_country": false + } + }, + { + "pk": "SH", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SHN", + "name": "SAINT HELENA", + "printable_name": "Saint Helena", + "display_order": 0, + "iso_3166_1_numeric": 654, + "is_shipping_country": false + } + }, + { + "pk": "KN", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "KNA", + "name": "SAINT KITTS AND NEVIS", + "printable_name": "Saint Kitts and Nevis", + "display_order": 0, + "iso_3166_1_numeric": 659, + "is_shipping_country": false + } + }, + { + "pk": "LC", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "LCA", + "name": "SAINT LUCIA", + "printable_name": "Saint Lucia", + "display_order": 0, + "iso_3166_1_numeric": 662, + "is_shipping_country": false + } + }, + { + "pk": "PM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SPM", + "name": "SAINT PIERRE AND MIQUELON", + "printable_name": "Saint Pierre and Miquelon", + "display_order": 0, + "iso_3166_1_numeric": 666, + "is_shipping_country": false + } + }, + { + "pk": "VC", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "VCT", + "name": "SAINT VINCENT AND THE GRENADINES", + "printable_name": "Saint Vincent and the Grenadines", + "display_order": 0, + "iso_3166_1_numeric": 670, + "is_shipping_country": false + } + }, + { + "pk": "WS", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "WSM", + "name": "SAMOA", + "printable_name": "Samoa", + "display_order": 0, + "iso_3166_1_numeric": 882, + "is_shipping_country": false + } + }, + { + "pk": "SM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SMR", + "name": "SAN MARINO", + "printable_name": "San Marino", + "display_order": 0, + "iso_3166_1_numeric": 674, + "is_shipping_country": false + } + }, + { + "pk": "ST", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "STP", + "name": "SAO TOME AND PRINCIPE", + "printable_name": "Sao Tome and Principe", + "display_order": 0, + "iso_3166_1_numeric": 678, + "is_shipping_country": false + } + }, + { + "pk": "SA", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SAU", + "name": "SAUDI ARABIA", + "printable_name": "Saudi Arabia", + "display_order": 0, + "iso_3166_1_numeric": 682, + "is_shipping_country": false + } + }, + { + "pk": "SN", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SEN", + "name": "SENEGAL", + "printable_name": "Senegal", + "display_order": 0, + "iso_3166_1_numeric": 686, + "is_shipping_country": false + } + }, + { + "pk": "RS", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SRB", + "name": "SERBIA", + "printable_name": "Serbia", + "display_order": 0, + "iso_3166_1_numeric": 688, + "is_shipping_country": false + } + }, + { + "pk": "SC", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SYC", + "name": "SEYCHELLES", + "printable_name": "Seychelles", + "display_order": 0, + "iso_3166_1_numeric": 690, + "is_shipping_country": false + } + }, + { + "pk": "SL", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SLE", + "name": "SIERRA LEONE", + "printable_name": "Sierra Leone", + "display_order": 0, + "iso_3166_1_numeric": 694, + "is_shipping_country": false + } + }, + { + "pk": "SG", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SGP", + "name": "SINGAPORE", + "printable_name": "Singapore", + "display_order": 0, + "iso_3166_1_numeric": 702, + "is_shipping_country": false + } + }, + { + "pk": "SK", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SVK", + "name": "SLOVAKIA", + "printable_name": "Slovakia", + "display_order": 0, + "iso_3166_1_numeric": 703, + "is_shipping_country": false + } + }, + { + "pk": "SI", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SVN", + "name": "SLOVENIA", + "printable_name": "Slovenia", + "display_order": 0, + "iso_3166_1_numeric": 705, + "is_shipping_country": false + } + }, + { + "pk": "SB", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SLB", + "name": "SOLOMON ISLANDS", + "printable_name": "Solomon Islands", + "display_order": 0, + "iso_3166_1_numeric": 90, + "is_shipping_country": false + } + }, + { + "pk": "SO", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SOM", + "name": "SOMALIA", + "printable_name": "Somalia", + "display_order": 0, + "iso_3166_1_numeric": 706, + "is_shipping_country": false + } + }, + { + "pk": "ZA", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ZAF", + "name": "SOUTH AFRICA", + "printable_name": "South Africa", + "display_order": 0, + "iso_3166_1_numeric": 710, + "is_shipping_country": false + } + }, + { + "pk": "GS", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SGS", + "name": "SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS", + "printable_name": "South Georgia and the South Sandwich Islands", + "display_order": 0, + "iso_3166_1_numeric": 239, + "is_shipping_country": false + } + }, + { + "pk": "ES", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ESP", + "name": "SPAIN", + "printable_name": "Spain", + "display_order": 0, + "iso_3166_1_numeric": 724, + "is_shipping_country": false + } + }, + { + "pk": "LK", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "LKA", + "name": "SRI LANKA", + "printable_name": "Sri Lanka", + "display_order": 0, + "iso_3166_1_numeric": 144, + "is_shipping_country": false + } + }, + { + "pk": "SD", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SDN", + "name": "SUDAN", + "printable_name": "Sudan", + "display_order": 0, + "iso_3166_1_numeric": 736, + "is_shipping_country": false + } + }, + { + "pk": "SR", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SUR", + "name": "SURINAME", + "printable_name": "Suriname", + "display_order": 0, + "iso_3166_1_numeric": 740, + "is_shipping_country": false + } + }, + { + "pk": "SJ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SJM", + "name": "SVALBARD AND JAN MAYEN", + "printable_name": "Svalbard and Jan Mayen Islands", + "display_order": 0, + "iso_3166_1_numeric": 744, + "is_shipping_country": false + } + }, + { + "pk": "SZ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SWZ", + "name": "SWAZILAND", + "printable_name": "Swaziland", + "display_order": 0, + "iso_3166_1_numeric": 748, + "is_shipping_country": false + } + }, + { + "pk": "SE", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SWE", + "name": "SWEDEN", + "printable_name": "Sweden", + "display_order": 0, + "iso_3166_1_numeric": 752, + "is_shipping_country": false + } + }, + { + "pk": "CH", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "CHE", + "name": "SWITZERLAND", + "printable_name": "Switzerland", + "display_order": 0, + "iso_3166_1_numeric": 756, + "is_shipping_country": false + } + }, + { + "pk": "SY", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "SYR", + "name": "SYRIAN ARAB REPUBLIC", + "printable_name": "Syrian Arab Republic", + "display_order": 0, + "iso_3166_1_numeric": 760, + "is_shipping_country": false + } + }, + { + "pk": "TW", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "TWN", + "name": "TAIWAN, PROVINCE OF CHINA", + "printable_name": "Taiwan, Province of China", + "display_order": 0, + "iso_3166_1_numeric": 158, + "is_shipping_country": false + } + }, + { + "pk": "TJ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "TJK", + "name": "TAJIKISTAN", + "printable_name": "Tajikistan", + "display_order": 0, + "iso_3166_1_numeric": 762, + "is_shipping_country": false + } + }, + { + "pk": "TZ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "TZA", + "name": "TANZANIA, UNITED REPUBLIC OF", + "printable_name": "United Republic of Tanzania", + "display_order": 0, + "iso_3166_1_numeric": 834, + "is_shipping_country": false + } + }, + { + "pk": "TH", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "THA", + "name": "THAILAND", + "printable_name": "Thailand", + "display_order": 0, + "iso_3166_1_numeric": 764, + "is_shipping_country": false + } + }, + { + "pk": "TL", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "TLS", + "name": "TIMOR-LESTE", + "printable_name": "Timor-Leste", + "display_order": 0, + "iso_3166_1_numeric": 626, + "is_shipping_country": false + } + }, + { + "pk": "TG", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "TGO", + "name": "TOGO", + "printable_name": "Togo", + "display_order": 0, + "iso_3166_1_numeric": 768, + "is_shipping_country": false + } + }, + { + "pk": "TK", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "TKL", + "name": "TOKELAU", + "printable_name": "Tokelau", + "display_order": 0, + "iso_3166_1_numeric": 772, + "is_shipping_country": false + } + }, + { + "pk": "TO", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "TON", + "name": "TONGA", + "printable_name": "Tonga", + "display_order": 0, + "iso_3166_1_numeric": 776, + "is_shipping_country": false + } + }, + { + "pk": "TT", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "TTO", + "name": "TRINIDAD AND TOBAGO", + "printable_name": "Trinidad and Tobago", + "display_order": 0, + "iso_3166_1_numeric": 780, + "is_shipping_country": false + } + }, + { + "pk": "TN", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "TUN", + "name": "TUNISIA", + "printable_name": "Tunisia", + "display_order": 0, + "iso_3166_1_numeric": 788, + "is_shipping_country": false + } + }, + { + "pk": "TR", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "TUR", + "name": "TURKEY", + "printable_name": "Turkey", + "display_order": 0, + "iso_3166_1_numeric": 792, + "is_shipping_country": false + } + }, + { + "pk": "TM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "TKM", + "name": "TURKMENISTAN", + "printable_name": "Turkmenistan", + "display_order": 0, + "iso_3166_1_numeric": 795, + "is_shipping_country": false + } + }, + { + "pk": "TC", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "TCA", + "name": "TURKS AND CAICOS ISLANDS", + "printable_name": "Turks and Caicos Islands", + "display_order": 0, + "iso_3166_1_numeric": 796, + "is_shipping_country": false + } + }, + { + "pk": "TV", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "TUV", + "name": "TUVALU", + "printable_name": "Tuvalu", + "display_order": 0, + "iso_3166_1_numeric": 798, + "is_shipping_country": false + } + }, + { + "pk": "UG", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "UGA", + "name": "UGANDA", + "printable_name": "Uganda", + "display_order": 0, + "iso_3166_1_numeric": 800, + "is_shipping_country": false + } + }, + { + "pk": "UA", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "UKR", + "name": "UKRAINE", + "printable_name": "Ukraine", + "display_order": 0, + "iso_3166_1_numeric": 804, + "is_shipping_country": false + } + }, + { + "pk": "AE", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ARE", + "name": "UNITED ARAB EMIRATES", + "printable_name": "The United Arab Emirates", + "display_order": 0, + "iso_3166_1_numeric": 784, + "is_shipping_country": false + } + }, + { + "pk": "US", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "USA", + "name": "UNITED STATES", + "printable_name": "The United States of America", + "display_order": 0, + "iso_3166_1_numeric": 840, + "is_shipping_country": false + } + }, + { + "pk": "UM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "UMI", + "name": "UNITED STATES MINOR OUTLYING ISLANDS", + "printable_name": "The United States Minor Outlying Islands", + "display_order": 0, + "iso_3166_1_numeric": 581, + "is_shipping_country": false + } + }, + { + "pk": "UY", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "URY", + "name": "URUGUAY", + "printable_name": "Uruguay", + "display_order": 0, + "iso_3166_1_numeric": 858, + "is_shipping_country": false + } + }, + { + "pk": "UZ", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "UZB", + "name": "UZBEKISTAN", + "printable_name": "Uzbekistan", + "display_order": 0, + "iso_3166_1_numeric": 860, + "is_shipping_country": false + } + }, + { + "pk": "VU", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "VUT", + "name": "VANUATU", + "printable_name": "Vanuatu", + "display_order": 0, + "iso_3166_1_numeric": 548, + "is_shipping_country": false + } + }, + { + "pk": "VE", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "VEN", + "name": "VENEZUELA", + "printable_name": "Venezuela (Bolivarian Republic of)", + "display_order": 0, + "iso_3166_1_numeric": 862, + "is_shipping_country": false + } + }, + { + "pk": "VN", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "VNM", + "name": "VIET NAM", + "printable_name": "Viet Nam", + "display_order": 0, + "iso_3166_1_numeric": 704, + "is_shipping_country": false + } + }, + { + "pk": "VG", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "VGB", + "name": "VIRGIN ISLANDS, BRITISH", + "printable_name": "British Virgin Islands", + "display_order": 0, + "iso_3166_1_numeric": 92, + "is_shipping_country": false + } + }, + { + "pk": "VI", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "VIR", + "name": "VIRGIN ISLANDS, U.S.", + "printable_name": "United States Virgin Islands", + "display_order": 0, + "iso_3166_1_numeric": 850, + "is_shipping_country": false + } + }, + { + "pk": "WF", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "WLF", + "name": "WALLIS AND FUTUNA", + "printable_name": "Wallis and Futuna Islands", + "display_order": 0, + "iso_3166_1_numeric": 876, + "is_shipping_country": false + } + }, + { + "pk": "EH", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ESH", + "name": "WESTERN SAHARA", + "printable_name": "Western Sahara", + "display_order": 0, + "iso_3166_1_numeric": 732, + "is_shipping_country": false + } + }, + { + "pk": "YE", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "YEM", + "name": "YEMEN", + "printable_name": "Yemen", + "display_order": 0, + "iso_3166_1_numeric": 887, + "is_shipping_country": false + } + }, + { + "pk": "ZM", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ZMB", + "name": "ZAMBIA", + "printable_name": "Zambia", + "display_order": 0, + "iso_3166_1_numeric": 894, + "is_shipping_country": false + } + }, + { + "pk": "ZW", + "model": "address.country", + "fields": { + "iso_3166_1_a3": "ZWE", + "name": "ZIMBABWE", + "printable_name": "Zimbabwe", + "display_order": 0, + "iso_3166_1_numeric": 716, + "is_shipping_country": false + } + } +] diff --git a/sandbox/manage.py b/sandbox/manage.py new file mode 100755 index 0000000..f9726f9 --- /dev/null +++ b/sandbox/manage.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/sandbox/settings.py b/sandbox/settings.py new file mode 100644 index 0000000..981158c --- /dev/null +++ b/sandbox/settings.py @@ -0,0 +1,267 @@ +import os + +# Django settings for oscar project. +PROJECT_DIR = os.path.dirname(__file__) +location = lambda x: os.path.join(os.path.dirname(os.path.realpath(__file__)), x) + +DEBUG = True +TEMPLATE_DEBUG = True +SQL_DEBUG = True + +ADMINS = ( + # ('Your Name', 'your_email@domain.com'), +) +EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' + +USE_TZ = True + +MANAGERS = ADMINS + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. + 'NAME': location('db.sqlite'), # Or path to database file if using sqlite3. + 'USER': '', # Not used with sqlite3. + 'PASSWORD': '', # Not used with sqlite3. + 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. + 'PORT': '', # Set to empty string for default. Not used with sqlite3. + } +} +ATOMIC_REQUESTS = True + +# Local time zone for this installation. Choices can be found here: +# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name +# although not all choices may be available on all operating systems. +# On Unix systems, a value of None will cause Django to use the same +# timezone as the operating system. +# If running in a Windows environment this must be set to the same as your +# system time zone. +TIME_ZONE = 'Europe/London' + +# Language code for this installation. All choices can be found here: +# http://www.i18nguy.com/unicode/language-identifiers.html +LANGUAGE_CODE = 'en-gb' + +gettext_noop = lambda s: s +LANGUAGES = ( + ('en-gb', gettext_noop('British English')), + ('zh-cn', gettext_noop('Simplified Chinese')), + ('nl', gettext_noop('Dutch')), + ('it', gettext_noop('Italian')), + ('pl', gettext_noop('Polish')), + ('ru', gettext_noop('Russian')), + ('sk', gettext_noop('Slovak')), + ('pt-br', gettext_noop('Brazilian Portuguese')), + ('fr', gettext_noop('French')), + ('de', gettext_noop('German')), + ('ko', gettext_noop('Korean')), + ('uk', gettext_noop('Ukrainian')), + ('es', gettext_noop('Spanish')), + ('da', gettext_noop('Danish')), + ('ar', gettext_noop('Arabic')), + ('ca', gettext_noop('Catalan')), + ('cs', gettext_noop('Czech')), + ('el', gettext_noop('Greek')), +) + +SITE_ID = 1 + +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. +USE_I18N = True + +# If you set this to False, Django will not format dates, numbers and +# calendars according to the current locale +USE_L10N = True + +# Absolute path to the directory that holds media. +# Example: "/home/media/media.lawrence.com/" +MEDIA_ROOT = location("public/media") + +# URL that handles the media served from MEDIA_ROOT. Make sure to use a +# trailing slash if there is a path component (optional in other cases). +# Examples: "http://media.lawrence.com", "http://example.com/media/" +MEDIA_URL = '/media/' + +# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a +# trailing slash. +# Examples: "http://foo.com/media/", "/media/". +#ADMIN_MEDIA_PREFIX = '/media/admin/' + +STATIC_URL = '/static/' +STATIC_ROOT = location('public') + +# Make this unique, and don't share it with anybody. +SECRET_KEY = '$)a7n&o80u!6y5t-+jrd3)3!%vh&shg$wqpjpxc!ar&p#!)n1a' + +MIDDLEWARE = ( + 'django.middleware.locale.LocaleMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', + 'debug_toolbar.middleware.DebugToolbarMiddleware', + 'oscar.apps.basket.middleware.BasketMiddleware', +) + +INTERNAL_IPS = ('127.0.0.1',) + +ROOT_URLCONF = 'urls' + +from oscar import OSCAR_MAIN_TEMPLATE_DIR + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [ + location('templates'), + os.path.join(OSCAR_MAIN_TEMPLATE_DIR, 'templates'), + OSCAR_MAIN_TEMPLATE_DIR, + ], + 'OPTIONS': { + 'loaders': [ + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', + ], + 'context_processors': [ + 'django.contrib.auth.context_processors.auth', + 'django.template.context_processors.request', + 'django.template.context_processors.debug', + 'django.template.context_processors.i18n', + 'django.template.context_processors.media', + 'django.template.context_processors.static', + 'django.contrib.messages.context_processors.messages', + + 'oscar.apps.search.context_processors.search_form', + 'oscar.apps.promotions.context_processors.promotions', + 'oscar.apps.checkout.context_processors.checkout', + 'oscar.core.context_processors.metadata', + ], + } + } +] + +# A sample logging configuration. The only tangible logging +# performed by this configuration is to send an email to +# the site admins on every HTTP 500 error. +# See http://docs.djangoproject.com/en/dev/topics/logging for +# more details on how to customize your logging configuration. +LOGGING = { + 'version': 1, + 'disable_existing_loggers': False, + 'formatters': { + 'verbose': { + 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s' + }, + 'simple': { + 'format': '%(levelname)s %(message)s' + }, + }, + 'handlers': { + 'null': { + 'level': 'DEBUG', + 'class': 'logging.NullHandler', + }, + 'console': { + 'level': 'DEBUG', + 'class': 'logging.StreamHandler', + 'formatter': 'verbose' + }, + 'mail_admins': { + 'level': 'ERROR', + 'class': 'django.utils.log.AdminEmailHandler', + }, + }, + 'loggers': { + 'django': { + 'handlers': ['null'], + 'propagate': True, + 'level': 'INFO', + }, + 'django.request': { + 'handlers': ['mail_admins'], + 'level': 'ERROR', + 'propagate': False, + }, + 'oscar.checkout': { + 'handlers': ['console'], + 'propagate': True, + 'level': 'INFO', + }, + 'django.db.backends': { + 'handlers': ['null'], + 'propagate': False, + 'level': 'DEBUG', + }, + 'paypal.express': { + 'handlers': ['console'], + 'propagate': True, + 'level': 'DEBUG', + }, + 'paypal.payflow': { + 'handlers': ['console'], + 'propagate': True, + 'level': 'DEBUG', + }, + } +} + + +INSTALLED_APPS = [ + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.messages', + 'django.contrib.admin', + 'django.contrib.flatpages', + 'django.contrib.staticfiles', + # External apps + 'django_extensions', + 'debug_toolbar', + # Apps from oscar + 'cashondelivery', + 'widget_tweaks', +] + +from oscar import get_core_apps +INSTALLED_APPS = INSTALLED_APPS + get_core_apps([ + 'apps.shipping', + 'apps.checkout']) + +AUTHENTICATION_BACKENDS = ( + 'oscar.apps.customer.auth_backends.EmailBackend', + 'django.contrib.auth.backends.ModelBackend', +) + +LOGIN_REDIRECT_URL = '/accounts/' +APPEND_SLASH = True + +# Oscar settings +from oscar.defaults import * +OSCAR_ALLOW_ANON_CHECKOUT = True + +OSCAR_SHOP_TAGLINE = 'Cash On Delivery' + +# Add Cash on delivery dashboard stuff to settings +from django.utils.translation import ugettext_lazy as _ +OSCAR_DASHBOARD_NAVIGATION.append( + { + 'label': _('Payment'), + 'icon': 'icon-money', + 'children': [ + { + 'label': _('COD transactions'), + 'url_name': 'cashondelivery-transaction-list', + }, + ] + }) + +# Haystack settings +HAYSTACK_CONNECTIONS = { + 'default': { + 'ENGINE': 'haystack.backends.simple_backend.SimpleEngine', + }, +} diff --git a/sandbox/urls.py b/sandbox/urls.py new file mode 100644 index 0000000..eb23571 --- /dev/null +++ b/sandbox/urls.py @@ -0,0 +1,32 @@ +from django.conf.urls import include, url +from django.conf.urls.i18n import i18n_patterns +from django.conf import settings +from django.contrib import admin +from django.contrib.staticfiles.urls import staticfiles_urlpatterns +from django.conf.urls.static import static + +from oscar.app import application + +from cashondelivery.dashboard.app import application as cod_app + +admin.autodiscover() + +urlpatterns = [ + url(r'^admin/', admin.site.urls), + url(r'^i18n/', include('django.conf.urls.i18n')), +] +urlpatterns += i18n_patterns( + # Cash on delivery integration... + url(r'^dashboard/cod/', cod_app.urls), + url(r'', application.urls), +) + +if settings.DEBUG: + urlpatterns += staticfiles_urlpatterns() + urlpatterns += static( + settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) + + import debug_toolbar + urlpatterns = [ + url(r'^__debug__/', include(debug_toolbar.urls)), + ] + urlpatterns diff --git a/setup.py b/setup.py index 3f302d5..95f5fc4 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,12 @@ license='BSD', packages=find_packages(exclude=['sandbox*', 'tests*']), include_package_data=True, - install_requires=['django-oscar'], + install_requires=['django-oscar>=1.5,<1.7'], + tests_require=[ + 'django-webtest==1.9.2', + 'pytest-cov==2.5.1', + 'pytest-django==3.1.2', + ], # See http://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=['Environment :: Web Environment', 'Framework :: Django',