* 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
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.
Remove obsolete debug toolbar settings from sandbox. Fixes #2229.
`DEBUG_TOOLBAR_PATCH_SETTINGS` is obsolete in django-debug-toolbar 1.6. We also don't need to specify `DEBUG_TOOLBAR_PANELS` as it is identical to the default.
As part of my last PR, I had USE_LESS enabled for testing purposes and
accidentally committed the setting. By default, we don't want to run the
(somewhat slow) pre-processor!
- Set Meta.app_label on models created in the tests
- Use logging.NullHandler instead of django.utils.log.NullHandler
- Use oscar.core.loading.get_model() instead of django's get_model
- Remove template tags '{% load url from future %}'
django-compressor used to trigger processing of the less files during
development. But with the browser-based compiler, an easy replacement is
available. This even lowers the barrier to altering styles, because
getting npm up and running isn't required.
Offline compilation isn't impacted.
Using the most current less version seems to not cause any trouble, so I
removed the version requirement.
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.
This removes all the bits and bobs where we referenced South, or added
some code supporting it. Documentation will be updated in a later
commit, together with other Django changes.
This image importer is quite old and probably shouldn't be in the oscar
package (but in the sandbox itself) as it's only used by the sandbox.
This change ensure its logs messages are quieter when running "make
sandbox".
As Oscar depends directly on tables2 now, it should be returned as part
of get_core_apps, and has been removed from the requirements.txt and
INSTALLED_APPS calls.
* Use SILENCED_SYSTEM_CHECKS warning instead of test runner hack to
avoid the warning about a change in default test runners
* Conditionally use south in the demo settings
* Add native migrations and app configs for forked apps
Only add South to INSTALLED_APPS when using Django < 1.7
South has no support for Django 1.7, and Django's native migrations
should be used. As the sandbox needs to support both versions of
Django, we need to differentiate on the version.
Remove outdated settings and fix test runner warning with Django 1.7
ADMINS and MANAGERS aren't expected by Oscar, so we can safely
remove them. ADMINS and MANAGERS is kept for the sandbox as the hosted
sandbox (latest.oscarcommerce.com) uses the same settings and David
wouldn't get error messages otherwise.
Django 1.7 test runner changes are explained here:
214d1e1b0f/django/core/checks/compatibility/django_1_6_0.py (L17)
tl;dr: Setting it explicitly stops an annoying warning.
I've slightly refactored the changes introduced in the previous commit.
Removed setting line statuses in the sandbox because for most basic
scenarios, such fine-grained control is probably not necessary. And more
advanced scenarios want a custom pipeline anyway.
Closes #1391.
This allows updating more than one order's status, similar to how line
statuses of an order can be updated.
This commit is a squashed version of the changes in #1391.
Include location helper in docs, and use it more in settings
Two people on the mailing list tripped over the location helper, so it's
now included right next to where it is used.
The helper is now also used in a few more spots in the settings.