* Add Python 3.10 to test suite
* Support Django 4.2, remove Python 3.7 support and add Python 3.11 support
---------
Co-authored-by: Craig Weber <crgwbr@gmail.com>
When looking up a URL for a forked app, the previous mechanism fetched the top level AppConfig which allows every user.
The new mechanism creates a dict of dashboard URLs/configs and does a lookup to find a DashboardConfig.
This will also raise NoReverseMatch if the URL does not exist or is not a dashboard URL.
fix https://github.com/django-oscar/django-oscar/issues/3080
* Implement basic abstract thumbnails generator backend
* Create `oscar_thumbnail` template tag in `image_tags`
* Add `easy_thumbnails` to `INSTALLED_APPS` in sandbox settings
* Modify `primary_image` method of `Product` model
* Override in templates Sorl's `thumbnail` tag with `oscar_thumbnail` tag
* Check that related module is installed during thumbnail class initialization
* Add params to `original` field of `ProductImageFactory`
* Add media related URLs to test settings
* Add unit tests for thumbnailer backend
* Create test helpers in `test/utils`
These helpers will be used in tests related to thumbnails
* Add tests to check `oscar_thumbnail` template tag
* Add test to check images/thumbnails deleted for deleted product
* Move `sorl-thumbnail` and `easy-thumbnails` to `extras_require`
With this change these packages can be installed as
* `pip install django-oscar[sorl-thumbnail]`
* `pip install django-oscar[easy-thumbnails]`
* Updated "Template tags" section in docs with info about `oscar_thumbnail`
* Describe `OSCAR_THUMBNAILER` setting in "Settings" section of the docs
* Add information about created thumbnail backend to the release notes
- 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
Add compatibility for Django 2.1, and drop support for Python 3.4.
Django 2.1 works fine - the only issue was that more passwords
have been added to the CommonPasswordValidator which caused some tests
to fail. I've removed that validator from the test settings.
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.
Cleanup unused benefits and conditions after conditional offer removal.
Now after ConditionalOffer deleted will be deleted related Benefits and Conditions models (through post_delete signal) if they are no longer used by other offers (with exception of custom benefits/conditions). Plus some small changes related to PEP8 and typos.
Most real-world instances will use postgresql instead of sqlite so it's
better to use postgres for the tests. This also allows us to easily add
tests for concurrency issues which is not supported by sqlite
django-compressor served it's purpose, but given the advent of
more and more frontend JS work, and the accompanying build tools (grunt,
gulp, etc.), it makes less and less sense to use compressor. Jannis
Leidel himself also stepped back from maintaining it.
In my experience with Oscar project, it has also become a bit of a
liability to have compressor as a dependency. Most projects don't use it
any more, but it's not easy to disable/override because all our
templates include it.
So, let's keep things simple and remove it as a dependency. That paves
the way for using other tools, while it's always easy to add back.
I'm not sure why @codeinthehole, back in the days, opted to
manually configure settings instead of using a regular settings file for
the test suite. Most likely the reasons for doing so have disappeared.
So I turned our tests/config.py into a normal settings file, and use
that accordingly. That means we do things the standard Django way, and
it's easier to drop into a session with the test settings.