- Move Oscar app configs into Django app config classes
- Rename Oscar/Django apps' app config module
- Remove "oscar.get_core_apps()" and its app overriding
- Remove "oscar.OSCAR_CORE_APPS"
- Port app forking code to work with Django app registry
- Port class loading code to use app configs to get app properties
Fix validation of required phone_number field in PhoneNumberMixin.
If a phone_number field is required, and empty, then PhoneNumberMixin.clean() fails with a key error because the field does not exist in cleaned_data.
This patch fixes the clean() method to only attempt to clean a field if it exists in cleaned_data. If it doesn't then allow Django to raise a validation error for a missing required field.
Also added more comprehensive tests for the validation logic in the mixin.
Fix `ExtendedURLValidator` for locale-prefixed URLs for locales, different the current.
Previously, validation did not pass when current locale is "en-gb" and URL is "/de/catalogue/" and visa versa due to default Django URL resolvers behaviour - they do not take into account all locales, only current.
With this change phone numbers (any qty) can be added as `ModelForm`
property `phone_numbers_fields` - dict where "keys" are names of
phone numbers fields and "values" are attributes of fields.
* `PhoneNumberMixin` clightly reworked and moved
from `oscar.views.generic` to `oscar.forms.mixins`
* Couple tests added (based on previous tests)
Switch to using Django's password validation framework in Django >=1.9
Django 1.9 introduced the AUTH_PASSWORD_VALIDATORS setting which allows for
more flexible password validation. Switch to using that when it is available,
with a fallback to Oscar's previous behaviour in Django 1.8 or when this
setting is empty.
The idea of splitting integration from unittests is good in theory
but leads to a lot of mental overhead. Besides whenever a tests
interacts with a database it isn't a unittest anyway.